Thursday, July 02, 2015
Clojure 1.7 is released, on Hacker News someone posts a transducer example:
(reduce + 0 (filter odd? (map inc (range 1000))))
by using transducer:
(def xf (comp (map inc) (filter odd?)))
(transduce xf + 0 (range 1000))
and need to watch Transducers by Rich Hickey - YouTube one more time.
base16 color scheme is simple and good looking, especially the grayscale one, so good.
Friday, July 03, 2015
when cider-jack-in
it complaints about WARNING: CIDER requires nREPL 0.2.7 (or newer) to work properly
even I already added the newer version in project.clj
. finally it is resolved by add them to ~/.lein/profiles.clj
:
{:user {:dependencies [[org.clojure/tools.nrepl "0.2.10"]]
:plugins [[cider/cider-nrepl "0.9.1"]]}}
Thursday, July 09, 2015
a good series of talks on java: Official ZeroTurnaround Account
Wednesday, July 15, 2015
still playing little bit clojure, conch is a library for executing shell commands.
also reading some books:
- 21st Century C: C Tips from the New School
- Big Data: Principles and best practices of scalable realtime data systems
Thursday, July 16, 2015
to allow self-signed certificate when using java, import the key to jvm:
openssl s_client -connect example.com:443
copy lines from -----BEGIN CERTIFICATE-----
to xyz.pem
, then import using keytool
keytool -import -alias myserver -keystore /path/to/jre/lib/security/cacerts -file xyz.pem
the default password is changeit
.
talking about PHP7, the beta is out. this slide has a good summary of the new stuffs: Speeding up the Web with PHP 7
I like this javascript-like syntax (haha):
(function() { ... })()
some ufw
notes:
- list rules:
ufw status verbose
- add rule:
ufw allow 22/tcp
- remove rule:
ufw delete allow 22/tcp
- port forwarding:
# update /etc/default/ufw DEFAULT_FORWARD_POLICY="ACCEPT" # update /etc/ufw/sysctl.conf net.ipv4.ip_forward=1 # update /etc/ufw/before.rules # before filter rules *nat :PREROUTING ACCEPT [0:0] :POSTROUTING ACCEPT [0:0] -A PREROUTING -i eth0 -p tcp --dport 22 -j DNAT --to-destination 192.168.1.10
do a ufw reload
after changes.
Friday, July 17, 2015
podcasts of this week:
- Episode 232: Mark Nottingham on HTTP/2 : Software Engineering Radio
- Ruby Rogues 216: RR Code Review Culture with Derek Prior
- Why Should You Major in Computer Science? | Mostly Erlang
looks like there are many good talks on Curry On Prague! 2015, check their youtube channel
Tuesday, July 21, 2015
convert flac to mp3
for f in *.flac; do flac -cd "$f" | lame -b 320 - "${f%.*}".mp3; done
Thursday, July 23, 2015
also installed java 9 via JDK 9 Early Access Releases, in order to test the new repl thing (details here: Java 9's New HTTP/2 and REPL)
OSCON 2015, Speaker Slides & Video
Friday, July 24, 2015
Spark Summit 2015 has some slides too.
reading Effective Ruby: 48 Specific Ways to Write Better Ruby, quite good.
it tells you difference between
class Counter
attr_accessor(:counter)
def initialize
counter = 0
end
end
and
class Counter
attr_accessor(:counter)
def initialize
self.counter = 0
end
end
and something like differnce between super
and super()
, and many. it's a good read.
another book Working with Ruby Threads looks interesting too. two free chapters, gonna read it first.
this week also read some MySQL cluster, actually it's better than I thought. from this reddit thread: MySQL 5.7 will considerably improve defaults, there are some good people working for MySQL~
but it's not the only option, Percona and MariaDB also provide cluster servers.
Monday, July 27, 2015
wonder what's the difference between if ($x)
and if (!empty($x))
in php? check this table: PHP type comparison tables (they are the same). however:
prior to PHP 5.5,
empty()
only supports variables; anything else will result in a parse error.
Thursday, July 30, 2015
start reading Clojure Web Development Essentials, it's about Luminus too.
first chapter has this one liner, it prints a tree of current directory, very cool:
find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
it seems latest version of Luminus doesn't use lein-ring plugin as default, so instead of lein ring server
just do lein run
also borrowed Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14 from local library, just because it's written by Scott Meyers.
Friday, July 31, 2015
in search of a list of hosts
to block, i found this repo: StevenBlack/hosts
this video has a little bit more detailed about the java 9 repl: jshell JDK 9 quick peek
Blog Archive
- Newer Entries
- 2015 August
- 2015 September
- 2015 October
- 2015 November
- 2015 December
- 2016 January
- 2016 February
- 2016 March
- 2016 April
- 2016 May
- 2016 June
- 2016 July
- 2016 August
- 2016 September
- 2016 October
- 2016 November
- 2016 December
- 2017 January
- 2017 February
- 2017 March
- 2017 April
- 2017 May
- 2017 June
- 2017 July
- 2017 August
- 2017 September
- 2017 October
- 2017 November
- 2017 December
- 2018 January
- 2018 February
- 2018 March
- 2018 April
- 2018 May
- 2018 June
- 2018 July
- 2018 August
- 2018 September
- 2018 October
- 2018 November
- 2018 December
- 2019 January
- 2019 February
- 2019 March
- 2019 April
- 2019 May
- 2019 July
- 2019 October
- 2019 November
- 2019 December
- 2020 August
- 2020 September
- 2020 October
- 2020 November
- 2020 December
- 2021 January
- 2021 February
- 2021 March
- 2021 April
- 2021 May
- 2021 June
- 2021 August
- 2021 September
- 2021 December
- 2022 March
- 2022 April
- 2022 May
- 2022 June
- 2022 July
- 2022 August
- 2022 September
- 2022 October
- 2022 November
- 2022 December
- 2023 January
- 2023 February
- 2023 March
- 2023 April
- 2023 July
- 2023 August
- 2023 September
- 2023 October
- 2023 November
- 2023 December
- 2024 January
- 2024 February
- 2024 March
- 2024 April
- 2024 May
- 2024 June
- 2024 August
- 2024 September
- Older Entries
- 2015 June
- 2015 May
- 2015 April
- 2015 March
- 2015 February
- 2015 January
- 2014 December
- 2014 November
- 2014 October
- 2014 September
- 2014 August
- 2014 March
- 2014 February
- 2014 January
- 2013 December
- 2013 October
- 2013 July
- 2013 June
- 2013 May
- 2013 March
- 2013 February
- 2013 January
- 2012 December
- 2012 November
- 2012 October
- 2012 September
- 2012 August