(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| class NotSoLazyGardener | |
| def apples | |
| @apples ||= [] | |
| end | |
| def pears | |
| @pears ||= [] | |
| end | |
| # Good luck in debugging this one |
Find it here: https://github.com/bitemyapp/learnhaskell
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
| $ time ghc --version | |
| The Glorious Glasgow Haskell Compilation System, version 7.6.3 | |
| real 0m0.074s | |
| user 0m0.006s | |
| sys 0m0.012s |
| #!/bin/sh | |
| # Cisco Anyconnect CSD wrapper for OpenConnect | |
| CSTUB="$HOME/.cisco/hostscan/bin/cstub" | |
| $ARCH=$(uname -m) | |
| if [[ "$ARCH" == "x86_64" ]] | |
| then |
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
If you have some experience working with Ruby you probably had to deal with collections. Collections can be tedious. But TTR (Thanks To Ruby) we have a large arsenal to deal with them!
In this post I'll show you two Ruby iterator methods I really love, thanks to its simplicity and beauty.
| % sublime: syntax Erlang | |
| config <- config_line* ~; | |
| % Here goes all possible top-level things | |
| config_line <- listener / loglevel / sessions / max_sessions_option / autogenerate_tokens / include / | |
| http_event / central / stream / rewrite / live / file / | |
| view_auth / edit_auth; |