Monday, February 02, 2015
an even cooler tool for creating GIF screencasts of a terminal: mkcast
in vim, the asterisk key *
will search for the word under the cursor. emacs doesn't have a built in function for it, but in elisp we trust:
(defun usrj/asterisk ()
(interactive)
(save-excursion
(backward-word)
(kill-ring-save (point) (progn
(forward-word)
(point)))
(occur (substring-no-properties (car kill-ring)))))
Wednesday, February 04, 2015
yahoo open sources Kafka Manager (blog), looks nice.
the above usrj/asterisk
function, using thing-at-point
will be more concise:
(defun usrj/asterisk()
(interactive)
(save-excursion
(occur (thing-at-point 'symbol))
(other-window 1)))
also will switch to the occur
buffer, type e
can do instant editing.
copy line is easy too (which I do a lot under netbeans):
(defun usrj/copy-line-down()
(interactive)
(let ((line (thing-at-point 'line)))
(forward-line 1)
(insert line)))
but then I found thing-at-point
inclues newline char (and slow), as suggested I switched to:
(let (line)
(setq line (buffer-substring-no-properties (line-beginning-position) (line-end-position))))
one more, a function to insert markdown link, it will fetch the url content and grab title tag as link description:
(defun usrj/md-link(url)
(interactive (list(read-string "url: ")))
(let (title buf)
(with-temp-buffer
(url-insert-file-contents url)
(setq buf (buffer-string))
(string-match "<title>\\(.*\\)</title>" buf)
(setq title (match-string 1 buf))
(message ""))
(insert (concat "[" title "](" url ")"))))
Thursday, February 05, 2015
quick links
- Guzzle is a better way to do curl using PHP
- ScreenToGif records screen and save to gif (windows)
these are some Windows patched fonts for powerline, works with following characters:
TMUX_POWERLINE_SEPARATOR_LEFT_BOLD=""
TMUX_POWERLINE_SEPARATOR_LEFT_THIN=""
TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD=""
TMUX_POWERLINE_SEPARATOR_RIGHT_THIN=""
I still don't quite get what reactive means, Manning has few upcoming books on reactive programming:
- Reactive Web Applications with Play
- Functional Reactive Programming
- Reactive Application Development
- Functional and Reactive Domain Modeling
first chapter of above books is free, which should be explaining what reactive is:
(from Reactive Web Applications with Play)
reactive programs:
- are available to continously interact with their environment
- run at a speed that is dictated by the environment, not the program itself
- work in response to external demand
four traits that make up reactive applications are:
- responsive: react to users
- scalable: react to load
- resilient: react to failure
- event-driven: react to events
Friday, February 06, 2015
knowing that Atom is moved to io.js, I think io.js has a more bright future than Node.js
but that's not what I'm interested in, ES6 is. more about ES6:
solved another emacs problem under windows – retrieving https content:
- get gnutls-3.x.x-w32-bin.zip
- unzip all
.dll
files frombin/
to emacsbin/
- restart emacs
Monday, February 09, 2015
display current DNS cache: ipconfig /displaydns
when reading first chapter of Reactive Web Applications with Play, few new concepts I didn't hear before:
- bulkhead pattern (Composable and streamable Play apps)
- back-pressure propagation
- circuit breakers
Reactive Application Development explains What’s the difference between Message, Command, and Event?:
Events are something that has happened, which is an important distinction when compared to commands. You can reject a command as its a request to do something, whereas an event, you cannot reject because it represent something that has already occurred.
Wednesday, February 11, 2015
reading Play for Java and Practical Load Balancing
Play actually is very Symfony-like, much friendly than the spring framework.
this week's podcast:
- se-radio: Episode 219: Apache Kafka with Jun Rao
- Matz on the Hanselminutes
- sadly, Last episode of the Java Posse (video)
DAGGER 2 - A New Type of dependency injection - YouTube
Friday, February 13, 2015
listened to More Languages! episode of the mostly erlang podcast, known that Seven More Languages in Seven Weeks is out.
this year I was planned to learn erlang and ocaml, but I'll add 3 more on the list (maybe next year): elixir, elm and julia.
Wednesday, February 18, 2015
quick read Modern PHP: New Features and Good Practices, few things I didn't notice before:
- Carbon - A simple PHP API extension for DateTime.
- custom stream wrappers
- error handlers
this book covers hhvm too.
there's a new blog post about new features in hhvm 3.6: Coming Soon in HHVM
when I tried to find out some questions about event loop and process (maybe I need to read some libuv, updated: I found what I want here, and I understand now why people say freebsd is better for node.js), I found this talk: Brian Ford: Is Node.js Better?, I like the way he talks and his talk is quite informative. but I couldn't find any talk he gave after 2012, then I know he changed his name to Brian Shirai
he's also creator or Rubinius and RubySpec (project ended)
happy lunar new year !
Sunday, February 22, 2015
some java 8 stuff
// infinite stream
Stream.iterate(1, n -> n + 1);
// use limit() to get a lazy stream
Stream.iterate(1, n -> n + 1).limit(10);
// stream can not be reused
// create a supplier of stream if want to reuse
Supplier<Stream> R = () -> Stream.iterate(1, n -> n + 1).limit(10);
R.get()... // stream
// range
IntStream.rangeClosed(1, 10);
IntStream.rangeClosed(1, 10).boxed(); // Stream
and about flatMap
, an easy way to understand it is this figure
Tuesday, February 24, 2015
the latest episode of NodeUp is about libuv
Tuesday, February 24, 2015
a very interesting site: Many things about OCaml
reading Java 8 in Action, it's really good.
Thursday, February 26, 2015
RancherOS an interesting os for docker containers (20MB only?)
System Docker creates a special system service container called User Docker. A separate Docker daemon runs in the User Docker container.
looks nice, time to vagrant up:
git clone https://github.com/rancherio/os-vagrant.git
cd os-vagrant
vagrant up
vagrant ssh
another interesting project is The Recki Compiler Toolkit for PHP, heard from this post
Track JavaScript, AngularJS and jQuery errors with Google Analytics is worth trying too (even though I don't use google analytics myself)
listened Taylor Otwell on The Changelog podcast episode, it's good that php has it's heroku: Laravel Forge
Blog Archive
- Newer Entries
- 2015 March
- 2015 April
- 2015 May
- 2015 June
- 2015 July
- 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