(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.
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)| /* | |
| MIT License | |
| ui-router Port of Firebase Simple Login RouteSecurityManager from | |
| https://github.com/firebase/angularFire-seed/blob/master/app/js/module.routeSecurity.js | |
| For any state that requires security, setup a custom data authRequired flag: | |
| .state('profile', { | |
| url: '/acct/profile', | |
| templateUrl: 'views/account/profile.html', |
This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
| var socketIO = require('socket.io'), | |
| io; | |
| // hapi plugin registration | |
| exports.register = function(plugin, options, next) { | |
| // this is the hapi specific binding | |
| io = socketIO.listen(plugin.servers[0].listener); | |
| io.sockets.on('connection', function(socket) { | |
| socket.emit({msg: 'welcome'}); |
When working with Git, there are two prevailing workflows are Git workflow and feature branches. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited, and the focus of this article.
If you are new to Git and Git-workflows, I suggest reading the atlassian.com Git Workflow article in addition to this as there is more detail there than presented here.
I admit, using Bash in the command line with the standard configuration leaves a bit to be desired when it comes to awareness of state. A tool that I suggest using follows these instructions on setting up GIT Bash autocompletion. This tool will assist you to better visualize the state of a branc
| module InventoryItems(Command(..), Event(..), handle) where | |
| import Data.Maybe(isJust) | |
| type Id = String | |
| type Name = String | |
| type Amount = Int | |
| data Command = CreateInventoryItem Id | |
| | RenameInventoryItem Id Name |
| Eshell V5.9.1 (abort with ^G) | |
| 1> rr(parent). | |
| [parent_type] | |
| 2> rr(child). | |
| [child_type,parent_type] | |
| 3> | |
| 3> | |
| 3> {ok, P1} = child:start_link(none). | |
| {ok,<0.42.0>} | |
| 4> |
| defmodule QuickSort do | |
| def sort([]), do: [] | |
| def sort([head|tail]) do | |
| {lesser, greater} = Enum.partition(tail, &(&1 < head)) | |
| sort(lesser) ++ [head] ++ sort(greater) | |
| end | |
| end | |
| IO.inspect QuickSort.sort([1,6,3,4,2,5]) |
| # install bzr and gource | |
| # get a branch of Mir's trunk code | |
| # create gource video | |
| $ sudo apt-get install bzr gource | |
| $ bzr branch lp:mir | |
| $ cd mir | |
| $ gource \ | |
| -s .06 \ |