I hereby claim:
- I am nhocki on github.
- I am nhocki (https://keybase.io/nhocki) on keybase.
- I have a public key ASAapzaRg-je5LhP7oDwNcUwVtbKVeEBCsezA2gZUQL60Ao
To claim this, I am signing this object:
| // Place your settings in this file to overwrite the default settings | |
| { | |
| "editor.fontFamily": "Inconsolata, Menlo, Monaco, 'Courier New', monospace", | |
| "editor.fontSize": 16, | |
| "editor.rulers": [ 80 ], | |
| "editor.tabSize": 2, | |
| "workbench.statusBar.visible": true, | |
| "files.trimTrailingWhitespace": true, | |
| "terminal.integrated.shell.osx": "/bin/zsh", | |
| "go.gopath": "/Users/tarjan/go", |
| #!/usr/bin/env bash | |
| CMD=${1:-false} | |
| URL=${2:-example.com} | |
| if [ $CMD = false ]; then | |
| echo "usage: " $0 "command [url:example.com]" | |
| exit 1 | |
| fi |
| require 'rubygems' | |
| require 'pry' | |
| $nodes = Hash.new | |
| class Index | |
| attr_reader :children, :name | |
| attr_accessor :parent | |
| def initialize(size, name, children = Array.new) |
I hereby claim:
To claim this, I am signing this object:
| # Bit.ly shortener | |
| # | |
| # Configuration: | |
| # HUBOT_BITLY_ACCESS_TOKEN | |
| module.exports = (robot) -> | |
| shorten: (url, callback) -> | |
| robot.http("https://api-ssl.bitly.com/v3/shorten") | |
| .query | |
| access_token: process.env.HUBOT_BITLY_ACCESS_TOKEN | |
| format: "json" |
| # prefork MPM | |
| # StartServers: number of server processes to start | |
| # MinSpareServers: minimum number of server processes which are kept spare | |
| # MaxSpareServers: maximum number of server processes which are kept spare | |
| # MaxRequestWorkers: maximum number of server processes allowed to start | |
| # MaxConnectionsPerChild: maximum number of requests a server process serves | |
| <IfModule mpm_prefork_module> | |
| StartServers 5 | |
| MinSpareServers 5 |
(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.
| // poller.go | |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/signal" | |
| "time" |
| PUBNUB_PUBLISH_KEY=YourPublishKey | |
| PUBNUB_SUBSCRIBE_KEY=YourSubscribeKey |
| # app/models/puntos.rb | |
| class Puntos < AR::Base | |
| PUNTOS_ALL_KEY = "all_puntos".freeze | |
| after_save :expire_cache | |
| after_destroy :expire_cache | |
| # Guarda un arreglo de hashes con el JSON pa mandar. | |
| def self.all_cached | |
| Rails.cache.fetch(PUNTOS_ALL_KEY) do |