Skip to content

Instantly share code, notes, and snippets.

@abstraktor
abstraktor / string.rb
Created February 3, 2012 12:35
rotX with ruby
# when you guessed a letter
# rotate("ammi://zbmanu.vhf/tulmktdmhk", "h".ord - "a".ord)
def rotate(str, num)
str.chars.map{|c| (c.ord<97) ? c: ((c.ord+num - 97)%26 + 97).chr}.join("")
end
@kirbysayshi
kirbysayshi / mass-aggregation-change.sh
Created November 23, 2011 17:14
quick examples of how to change many many wsp (graphite/whisper) files settings
for f in $(find $1 -iname "*.wsp"); do
if [ -a $f ];
then /opt/graphite/bin/whisper-set-aggregation-method.py $f max;
fi;
done
@torgeir
torgeir / Makefile
Created June 23, 2011 18:40
A Scala Makefile
SRC = scala
SOURCES = $(shell ls $(SRC)/*.scala)
S = scala
SC = scalac
TARGET = target
CP = $(TARGET):scalatest.jar
SPEC = scala.RomanSpec
compile: $(SOURCES:.scala=.class)
@olivergondza
olivergondza / d.jsf
Created June 17, 2011 21:28
JOE syntax highlight file for D programming language
# JOE syntax highlight file for D programming language
=Idle
=Bad bold red
=Comment green
=Constant cyan
=Escape bold cyan
=Type bold
=Keyword bold
=Brace magenta
@nickman
nickman / install.sh
Created May 20, 2011 13:16
Graphite Server Install Script for Ubuntu
#!/bin/bash
#######################################
# Graphite Install
# Run with sudo for best results
#
#######################################
if [[ "$(/usr/bin/whoami)" != "root" ]]; then
echo "This script must be run as root or using sudo.Script aborted."
exit 1
@paulirish
paulirish / utmstrip.user.js
Last active July 21, 2025 15:25
userscript: Drop the UTM params from a URL when the page loads
// ==UserScript==
// @name UTM param stripper
// @author Paul Irish
// @namespace http://github.com/paulirish
// @version 1.2
// @description Drop the UTM params from a URL when the page loads.
// @extra Cuz you know they're all ugly n shit.
// @include http*://*
// ==/UserScript==
@groupdock
groupdock / ejabberd_
Created June 16, 2010 13:15
ejabberd munin plugin
#!/bin/bash
#
# Updated/Modified by Luc Castera (2010-06-14). Intellum Inc.
# (http://www.intellum.com)
#
# Munin plugin for ejabberd2.
#
# Written by Lasse Karstensen <[email protected]> 2007-05-27.
# Based on ejabberd-plugin by Christian Dröge <[email protected]>
#