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
+set r_fullscreen "1" +set r_customaspect "1" +set r_customwidth "1440" +set r_customheight "900" +set r_mode "-1" +set fs_game cpma'
require "nokogiri"
some_data = nil
builder = Nokogiri::XML::Builder.new encoding: "UTF-8" do |xml|
xml.root do
# insert <options> first, and keep
# a reference to this node
options_node = xml.options
# Verdienstziele und weitere Parameter
# ===============================================================================================
Jahr=2012
# Gewerbesteuer berücksichtigen, "ja" oder "nein"?
GewerbesteuerEinrechnen = "nein"
# Jeweilige Jahresziele sollten in 10 Monaten erreicht werden
# ...wegen Weiterbildungen, Urlaub, Krankheit, Open Source Contribution
# MaxStd entspricht dabei dann 100% Auslastung
1.9.3-p194 migration-test ➜ rake db:setup --trace
** Invoke db:setup (first_time)
** Invoke db:schema:load_if_ruby (first_time)
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:create
db/development.sqlite3 already exists
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.
#
################################################################