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
1.9.3-p194 migration-test ➜ bundle exec rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
** Invoke db:_dump (first_time)
** Execute db:_dump
** Invoke db:schema:dump (first_time)
$ riak-admin transfers
Attempting to restart script through sudo -u riak
RPC to 'riak@SERVER2' failed: {'EXIT',
{{badrecord,chstate},
[{riak_core_ring,owner_node,1},
{riak_kv_status,
'-get_rings/0-lc$^0/1-0-',1},
{riak_kv_status,
'-get_rings/0-lc$^0/1-0-',1},
{riak_kv_status,get_rings,0},
@tisba
tisba / fizzbuzz.rb
Created August 6, 2012 08:08 — forked from judofyr/fizzbuzz.rb
Writing FizzBuzz with flip-flops
a=b=c=(1..100).each do |num|
print num, ?\r,
("Fizz" unless (a = !a) .. (a = !a)),
("Buzz" unless (b = !b) ... !((c = !c) .. (c = !c))),
?\n
end
@tisba
tisba / gist:3235540
Created August 2, 2012 08:48
XML stanza is too big / Policy Violation
10:42:25: (Libpurple: jabber) Recv (ssl)(182): <stream:error><policy-violation xmlns='urn:ietf:params:xml:ns:xmpp-streams'/><text xml:lang='' xmlns='urn:ietf:params:xml:ns:xmpp-streams'>XML stanza is too big</text></stream:error>
10:42:25: (Libpurple: connection) Connection error on 0x10f644da0 (reason: 0 description: Policy Violation)
10:42:25: Connection Disconnected: gc=f644da0 (Policy Violation)
10:42:25: <ESPurpleJabberAccount:265f660 8>:tisba@jabber.ccc.de accountConnectionReportDisconnect: Policy Violation
10:42:25: (Libpurple: jabber) Recv (ssl)(16): </stream:stream>
10:42:25: (Libpurple: cdsa) receive failed (-9806): Connection reset by peer
10:42:25: (Libpurple: cdsa) receive failed (-9806): Undefined error: 0
10:42:25: (Libpurple: account) Disconnecting account tisba@jabber.ccc.de/shakti2 (0x10f65fff0)
10:42:25: (Libpurple: connection) Disconnecting connection 0x10f644da0
10:42:25: (Libpurple: connection) Deactivating keepalive.
@tisba
tisba / curl-stats.txt
Created July 29, 2012 11:06
riak-admin status very slow
$ time curl http://localhost:8098/stats
<html><head><title>500 Internal Server Error</title></head><body><h1>Internal Server Error</h1>The server encountered an error while processing this request:<br><pre>{error,{exit,{json_encode,{bad_term,{error,timeout}}},
[{mochijson2,json_encode,2},
{mochijson2,'-json_encode_proplist/2-fun-0-',3},
{lists,foldl,3},
{mochijson2,json_encode_proplist,2},
{riak_kv_wm_stats,produce_body,2},
{webmachine_resource,resource_call,3},
{webmachine_resource,do,3},
{webmachine_decision_core,resource_call,1}]}}</pre><P><HR><ADDRESS>mochiweb+webmachine web server</ADDRESS></body></html>
@tisba
tisba / O2 web SMS send tool
Created July 13, 2012 19:34 — forked from rngtng/O2 web SMS send tool
send o2 SMS via shell
#!/usr/bin/perl
################################################################
#
# o2-sms.pl, v2.1 *** EARLY-BETA ***
#
# Copyright (c) 2002-06, Leonhard Fellermayr <leo@slacky.de>
# All rights reserved.
#
################################################################
@tisba
tisba / gist:3096530
Created July 12, 2012 07:53
OutBank 1.3 crash on startup
Process: OutBank [5823]
Path: /Applications/OutBank.app/Contents/MacOS/OutBank
Identifier: de.stoegerit.OutBankMac
Version: 1.3 (17104)
App Item ID: 451208372
App External ID: 8807444
Code Type: X86-64 (Native)
Parent Process: launchd [242]
Date/Time: 2012-07-12 09:48:09.897 +0200
@tisba
tisba / a.md
Created June 29, 2012 08:09 — forked from rkh/a.md

This allows you to use the following video streaming services outside of the US from your Mac without having to use a proxy or VPN, so no big bandwidth issues:

  • Netflix
  • Hulu / HuluPlus
  • CBS
  • ABC
  • MTV
  • theWB
  • CW TV
  • Crackle
var interval = 1000 / parseInt(process.argv[2], 10);
var counter = 0;
setInterval(function() {
counter++;
}, interval);
setInterval(function() {
console.log(counter);
counter = 0;
@tisba
tisba / avocadodb.rb
Created April 17, 2012 16:33
brew formula for AvocadoDB
require 'formula'
class Avocadodb < Formula
url "https://github.com/triAGENS/AvocadoDB/zipball/v0.3.11"
head "https://github.com/triAGENS/AvocadoDB.git"
homepage 'http://www.avocadodb.org/'
sha1 '5189d501e8e8eed540acf7997be31dfc38315409'
depends_on 'libev'