ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Jenkins Swarm Client | |
# | |
# chkconfig: 2345 89 9 | |
# description: jenkins-swarm-client | |
source /etc/rc.d/init.d/functions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Thee will be more information here when I share the entire problem space I'm working on, but | |
# in short, this is preview material for my second talk in a series called "What Computer Scientists Know". | |
# The first talk is on recursion, and goes through several examples., leading up to a problem based | |
# on a simple puzzle that initial estimates based on performance of a previous puzzle would take years | |
# to solve on modern computers with the techniques shown in Ruby. That sets the stage for improving the | |
# performance of that problem with threading, concurrency, and related tuning. | |
# | |
# The second talk is on threading and concurrency, touching on algorithmic performance as well. | |
# Using some knowledge of the problem (board symmetry, illegal moves, etc), we reduce the problem space | |
# to about .5% of what we initially thought it was. Still, the initial single threaded solution took more |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# S3 translates a '+' in filenames to %2B in the URL, breaking apt | |
# Here we will traverse any file in the pool/ dir and create a hardlink for | |
# any file that has a plus in its name. apt/wget will do the right thing. | |
Dir.chdir('<%= @repo_root %>') do | |
plusfiles = Dir.glob '**/*/*+*.deb' | |
begin | |
plusfiles.each do |file| | |
File.link(file, file.gsub('+', ' ')) | |
end | |
rescue SystemCallError # swallow this if file already exists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# docker build -t="rails" . | |
FROM ubuntu:12.04 | |
RUN apt-get update | |
## MYSQL | |
RUN apt-get install -y -q mysql-client libmysqlclient-dev | |
## RUBY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In this ZK demo, a partition places the primary on the minority component. All | |
operations time out while the cluster converges on a new primary, at which | |
point three clients (talking to the three nodes in the majority component) can | |
proceed again. When the partition is healed, the two minority nodes can begin | |
accepting writes again. As with single-node Postgres, Zookeeper's client | |
protocol and ZAB both allow for false negatives (timeouts may actually succeed) | |
but not false positives (every successful write *will* be present in the final | |
set.) | |
HOW TO READ THIS CHART: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FQDNLookup true | |
Hostname "localhost" | |
Interval 5 | |
LoadPlugin syslog | |
<Plugin syslog> | |
LogLevel info | |
</Plugin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Goal: Use Scalding to datamine the 2010 US Census data (kindly provided by @ElonAzoulay & @hmason), to find | |
Where do the WEALTHY WELL EDUCATED ELITE live ? | |
WEALTHY == house value quarter million, household income 150k | |
WELL EDUCATED == sort by edu, edu = (10 * Phd + 5 * MS + 1 * BS) score | |
*/ | |
import com.twitter.scalding._ | |
import cascading.tuple.Fields | |
import cascading.tap.SinkMode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
implicit class In[T](t:T) { | |
def in(opts:T*): Boolean = opts contains t | |
} | |
scala> 1 in ( 2, 3 ) | |
res1: Boolean = false | |
scala> 1 in ( 2, 3, 2, 1 ) | |
res2: Boolean = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jar 'com.netflix.hystrix:hystrix-core', '~>1.2.16' |