Skip to content

Instantly share code, notes, and snippets.

Perf Testing all the Things!

Sebastian Cohnen tisba

Perf Testing all the Things!
Block or report user

Report or block tisba

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
husobee / client_tls_info.go
Last active Aug 15, 2019
discovery of tls in go, and the handshake process
View client_tls_info.go
package main
import (
omegahm /
Created Apr 7, 2015
Create Gtihub labels from Bash
#!/usr/bin/env bash
# Colours picked from
# Label definitions
declare -A LABELS
# Platform
krasnoukhov /
Last active Jun 11, 2019
Profiling memory leaky Sidekiq applications with Ruby 2.1

My largest Sidekiq application had a memory leak and I was able to find and fix it in just few hours spent on analyzing Ruby's heap. In this post I'll show my profiling setup.

As you might know Ruby 2.1 introduced a few great changes to ObjectSpace, so now it's much easier to find a line of code that is allocating too many objects. Here is great post explaining how it's working.

I was too lazy to set up some seeding and run it locally, so I checked that test suite passes when profiling is enabled and pushed debugging to production. Production environment also suited me better since my jobs data can't be fully random generated.

So, in order to profile your worker, add this to your Sidekiq configuration:

timlinux /
Last active Jun 26, 2019
Setting up a hetzner machine with coreos

This gist describes how to set up a new machine running coreos.

Create an ssh key

ssh-keygen -t rsa -b 2048 -f ~/.ssh/id_rsa_kartoza99

Get the public key:

mechanomi /
Last active Oct 31, 2018
Export chat logs from
#!/usr/bin/env python
import sys
import urllib
import urlparse
import base64
import mimetypes
import cgi
from os import path
blackjid /
Last active May 1, 2019
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)
DonSchado / example_spec.rb
Last active Dec 22, 2015
Thoughtbot retracted their initial implementation of strong parameters matchers in v2.0.0 of shoulda-matchers, so we decided to build our own until new official ones are released. The following is a small matcher for testing what params should be permitted in controllers. The matcher's syntax is based on validation matchers. If you're not follow…
View example_spec.rb
# assuming your subject is the UsersController with a method user_params
describe UsersController do
describe "params" do
# per default the matcher extracts the subject and params method
it { should permit_params(:email, :name, :role) }
# to overwrite the params method use explicit .params_method()
it { should permit_params(:first_name, :last_name).params_method(:other_user_params) }
avdi / gol.exs
Last active Jun 3, 2016
Game of life in Elixir (take 1)
View gol.exs
defmodule Life do
def run(board) when is_binary(board) do
board |> parse_board |> run
def run(board) do
Life.print_board board
:timer.sleep 1000
board = next_board(board)
from lxml import etree
from copy import deepcopy
from math import ceil
itemsPerPage = 10
for inFile in ["episodes.all.m4a.rss", "episodes.all.mp3.rss"]:
xmlData = etree.parse(inFile)
judofyr / fizzbuzz.rb
Created Aug 1, 2012 — forked from JEG2/fizzbuzz.rb
Writing FizzBuzz with flip-flops
View fizzbuzz.rb
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))),
You can’t perform that action at this time.