(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.
# This is an example of the Stack Exchange Tier 1 HAProxy config | |
# The only things that have been changed from what we are running are: | |
# 1. User names have been removed | |
# 2. All Passwords have been remove | |
# 3. IPs have been changed to use the example/documentation ranges | |
# 4. Rate limit numbers have been changed to randome numbers, don't read into them | |
userlist stats-auth | |
group admin users $admin_user | |
user $admin_user insecure-password $some_password |
(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.
As Kyle brought up, Consul at the moment has a single known case of a potential inconsistency (Could be unknown cases lurking). Currently Consul works by electing a leader, who "leases" the position for LeaderLeaseTimeout interval. At each interval, it checks that a quorum of nodes still believes it to be the leader. At the same time, if a follower does not hear from the leader within randomInterva(HeartbeatTimeout, 2 * HeartbeatTimeout), it will start a new election.
require 'delegate' | |
module Support | |
class WarningFilter < DelegateClass(IO) | |
def write(line) | |
super if line !~ /^\S+gems\/ruby\-\S+:\d+: warning:/ | |
end | |
end | |
end |
# /config/initializers/sidekiq.rb | |
current_web_concurrency = Proc.new do | |
web_concurrency = ENV['WEB_CONCURRENCY'] | |
web_concurrency ||= Puma.respond_to? | |
(:cli_config) && Puma.cli_config.options.fetch(:max_threads) | |
web_concurrency || 16 | |
end | |
local_redis_url = Proc.new do |
# make sure that this line is present in /etc/apt/sources.list: deb http://be.archive.ubuntu.com/ubuntu/ precise universe | |
sudo apt-get update | |
sudo apt-get install -y cabal-install libgnutls-dev liblz-dev libxml-sax-perl pkg-config libidn11-dev libxml2-dev libgsasl7-dev git | |
# if not present in your ~/.{z,ba}shrc | |
export PATH="$HOME/.cabal/bin:"$PATH | |
# if it's NOT present, git-annex won't be on your $PATH so you won't be able to use it | |
# if you want to use another directory for the bins, append "--bindir=$HOME/bin" to the cabal commands |
package main | |
import ( | |
"bufio" | |
"bytes" | |
"flag" | |
"fmt" | |
"github.com/golang/groupcache" | |
"github.com/ha/doozer" | |
"io" |
var request = require('request'); | |
var unzip = require('unzip'); | |
var csv2 = require('csv2'); | |
request.get('http://s3.amazonaws.com/alexa-static/top-1m.csv.zip') | |
.pipe(unzip.Parse()) | |
.on('entry', function (entry) { | |
entry.pipe(csv2()).on('data', console.log); | |
}) | |
; |
Krav: det måste vara du som äger issue:et
Exempel för https://github.com/twingly/handbook/issues/2
$ git co -b structure
do some commits
$ git push -u origin structure
Branch structure set up to track remote branch structure from origin by rebasing.
alias gh="open \`git remote -v | grep [email protected] | grep fetch | head -1 | cut -f2 | cut -d' ' -f1 | sed -e's/:/\//' -e 's/git@/http:\/\//'\`" |