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
@tisba
tisba / yaml-check.rb
Created July 19, 2011 09:15
Check YML locales
require "YAML"
Dir["**/*yml"].each do |file|
begin
YAML.load_file(File.join(File.dirname(__FILE__), file))
rescue Exception => e
puts "Error in #{file}:"
p e
end
end
-module (test).
-export([start/0]).
start() ->
{ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 8087),
pong = riakc_pb_socket:ping(Pid),
{ok, _} = riakc_pb_socket:mapred(Pid,
[<<"sc">>],
[
{map, {modfun, riak_kv_mapreduce, map_object_value}, none, false},
#!/usr/bin/env bash
RVM_RUBY_NAME=`rvm current`
RUBY_VERSION='ruby-1.9.3-p125'
curl --location -O http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
curl --location -O http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
gem install linecache19-0.5.13.gem
gem install ruby-debug-base19-0.11.26.gem -- \
@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'
var interval = 1000 / parseInt(process.argv[2], 10);
var counter = 0;
setInterval(function() {
counter++;
}, interval);
setInterval(function() {
console.log(counter);
counter = 0;
@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
@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 / 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 / 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 / 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.