Skip to content

Instantly share code, notes, and snippets.

View Finkregh's full-sized avatar
🚲

Oluf Lorenzen Finkregh

🚲
View GitHub Profile
@Finkregh
Finkregh / Debianize-Git-Jenkins
Created December 29, 2011 10:51 — forked from jeffery/Debianize-Git-Jenkins
Trigger the build of a debian package for a Git SCM project via Jenkins CI
#!/bin/bash
#
# This is a helper script to trigger the build of a debian package for a
# project which is in Git SCM and integrated via Jenkins CI
#
# The trigger used for the package build is a string "bump for release"
# which is part of the commit message for the Git repository.
#
# The Changelog is then parsed to obtain the release version and then
# the repository is exported for package building
@Finkregh
Finkregh / ideal ops.md
Created May 31, 2012 06:37 — forked from bhenerey/ideal ops.md
ideal ops checklist

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

@Finkregh
Finkregh / rc.d
Created August 14, 2012 13:37 — forked from jippi/rc.d
Logstash Init script
update-rc.d logstash-shipper defaults
update-rc.d logstash-reader defaults
@Finkregh
Finkregh / latency.markdown
Created August 22, 2012 11:40 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@Finkregh
Finkregh / sbm.sh
Created September 18, 2012 15:38 — forked from splitbrain/sbm.sh
CLI tool to create an SSH alias
# SSH bookmark creator
sbm(){
if [ $# -lt 2 ]; then
echo "Usage: sbm <short> [<user>@]<hostname> [-p <port>]" >&2
return 1
fi
short=$1
arg=$2
@Finkregh
Finkregh / logstash.conf
Created October 8, 2012 09:37 — forked from reyjrar/logstash.conf
LogStash Configuration
input {
tcp {
type => "syslog"
port => 8514
}
}
filter {
## DISCARD IMPROPERLY FORMATTED MESSAGES
@Finkregh
Finkregh / graphite-deb.sh
Created November 12, 2012 08:36 — forked from rcrowley/graphite-deb.sh
Graphite Debian packaging
VERSION="0.9.9"
BUILD="betable1"
set -e -x
# Keep track of the original working directory.
OLDESTPWD="$PWD"
# Work in a temporary directory.
cd "$(mktemp -d)"
# graphite-web install is hardcoded in setup.cfg to /opt/graphite
sudo mkdir /opt/graphite
sudo chown brad.users /opt/graphite
# run under python2.7 virtualenv
virtualenv --python=python2.7 ~/ve/graphite
source ~/ve/graphite/bin/activate
# install the necessary python packages (simplejson is for flot graphs)
pip install graphite-web carbon whisper django django-tagging uwsgi simplejson
[solarized-dark]
background = #002b36
foreground = #839496
majorLine = #fdf6e3
minorLine = #eee8d5
lineColors = #268bd2,#859900,#dc322f,#d33682,#db4b16,#b58900,#2aa198,#6c71c4
fontName = Sans
fontSize = 10
fontBold = False
fontItalic = False
@Finkregh
Finkregh / gist:5363493
Created April 11, 2013 13:45
running kibana behind nginx as reverse-proxy (replace '/kibana' with '', if you do not want to access kibana via /kibana)
location /kibana {
# rewrite before passing to proxy
rewrite /kibana/(.*) /$1 break;
proxy_pass http://127.0.0.1:5601;
# include nginx' proxy-defaults
include proxy_params;
# serve static stuff directly from the static-directory
location /kibana/favicon.ico {
alias /foo/Kibana-0.2.0/static/favicon.ico;