Skip to content

Instantly share code, notes, and snippets.

View tisba's full-sized avatar
🚀
Perf Testing all the Things!

Sebastian Cohnen tisba

🚀
Perf Testing all the Things!
View GitHub Profile
diff --git i/include/ts_config.hrl w/include/ts_config.hrl
index ceab838..28cbbb2 100644
--- i/include/ts_config.hrl
+++ w/include/ts_config.hrl
@@ -76,7 +76,8 @@
total_popularity = 0, % should be 100 if we use probabilites; sum of all weights if we use weights
use_weights , % true if we use weights instead of probabilities
total_server_weights=0,
- job_notify_port
+ job_notify_port,
class A
class << self
protected
def protected_class_method
puts "I'm a protected class method! Called by #{caller.first}"
end
end
end
class B < A
@tisba
tisba / gol.exs
Created July 22, 2013 08:10 — forked from avdi/gol.exs
defmodule Life do
def run(board) when is_binary(board) do
board |> parse_board |> run
end
def run(board) do
IO.write("\e[H\e[2J")
Life.print_board board
:timer.sleep 1000
board = next_board(board)
"use strict";
var _ = require("underscore")
, ForeverAgent = require("request/forever");
exports.createKeepAliveAgent = function createKeepAliveAgent() {
var agent = new ForeverAgent();
agent.close = function close() {
var self = this;
// patch riak-js
var Meta = require("riak-js/lib/meta");
if (!_.contains(Meta.keywords, "agent")) {
Meta.keywords.push("agent");
}
// "use" patch
var options = {}; // set your riak-js options here
==> Downloading http://downloads.sourceforge.net/project/justniffer/justniffer/justniffer%200.5.11/justniffer_0.5.11.tar.gz
Already downloaded: /Library/Caches/Homebrew/justniffer-0.5.11.tar.gz
tar xf /Library/Caches/Homebrew/justniffer-0.5.11.tar.gz
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file lib/libnids-1.21_patched/configure.gnu
==> ./configure --prefix=/usr/local/Cellar/justniffer/0.5.11
./configure --prefix=/usr/local/Cellar/justniffer/0.5.11
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
source "https://rubygems.org"
gem "celluloid-redis"
./rebar get-deps
Uncaught error in rebar_core: {'EXIT',
{badarg,
[{re,split,
[[80,82,79,77,80,84,61,36,40,114,118,109,95,
112,114,111,109,112,116,41,37,123,37,40,
63,46,37,123,37,98,37,115,37,117,27,91,48,
48,109,37,125,46,37,83,41,37,125,37,123,
27,91,51,50,109,37,125,36,40,103,101,116,
95,103,105,116,95,112,114,111,109,112,116,
2.0.0 --trace
rvm 1.18.11 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
/Users/basti/.rvm/scripts/cli:745 __rvm_parse_args:672 while case case[[ -n 5.0.2 ]]
/Users/basti/.rvm/scripts/cli:780 __rvm_parse_args:707 while if[[ -z install ]]
/Users/basti/.rvm/scripts/cli:783 __rvm_parse_args:710 while if[[ error == install || 0 -eq 1 || -n '' ]]
/Users/basti/.rvm/scripts/cli:89 __rvm_parse_args:16 while[[ -n '' ]]
/Users/basti/.rvm/scripts/cli:788 __rvm_parse_args:715 : rvm_ruby_args:0::
/Users/basti/.rvm/scripts/cli:790 __rvm_parse_args:717 if[[ -n '' ]]
CC = gcc-4.2
LD = ld
LDSHARED = gcc-4.2 -dynamic -bundle
CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libxml2/include -I/usr/local/opt/curl-ca-bundle/include -I/usr/local/opt/sqlite/include -I. -I.ext/include/x86_64-darwin12.2.1 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libxml2/lib -L/usr/local/opt/curl-ca-bund