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 / README.md
Created December 28, 2016 10:16 — forked from blackjid/README.md
How configure your raspberry pi with dashing to have a awesome dashboard

Raspberry pi dashboard

This is what we did to setup a few dashboards at platanus

You'll need

  • Raspberry Pi
  • Dashing Service
  • Wifi stick (optional)
-module(elasticsearch).
-export([autocomplete/1, autocomplete/0,
search/1, search/0,
start/0,
stop/0,
loop/1]).
-on_load(start/0).
%% Return an autocomplete request
autocomplete() ->
@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)
@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 / 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 / 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
Scenario: Get List of My Hitchhiking Items via API
Given the existing things:
|name|
|The Guide (duh)|
|A towel|
|Sub-Etha Sens-O-Matic|
|Pan Galactic Gargle Blaster|
|Kill-o-Zap blaster pistol|
And the existing accounts:
|email|name|password|
@tisba
tisba / partials.rb
Created August 10, 2010 14:53 — forked from lenary/partials.rb
# stolen from http://github.com/cschneid/irclogger/blob/master/lib/partials.rb
# and made a lot more robust by me
# this implementation uses erb by default. if you want to use any other template mechanism
# then replace `erb` on line 13 and line 17 with `haml` or whatever
module Sinatra::Partials
def partial(template, *args)
template_array = template.to_s.split('/')
template = template_array[0..-2].join('/') + "/_#{template_array[-1]}"
options = args.last.is_a?(Hash) ? args.pop : {}
options.merge!(:layout => false)