Skip to content

Instantly share code, notes, and snippets.

View SEJeff's full-sized avatar

Jeff Schroeder SEJeff

View GitHub Profile
postgresql-install:
pkg.installed:
- names:
- postgresql-8.4
- postgresql-server-dev-8.4
- postgresql-client-8.4
- postgresql-client-common
- postgresql-common
main:
@SEJeff
SEJeff / gist:3252367
Created August 3, 2012 22:56 — forked from avimar/gist:3092732
install node.js from source with salt
nodejs-deps:
pkg.installed:
- names:
- g++
- curl
- libssl-dev
- apache2-utils
require:
- pkg: git
@SEJeff
SEJeff / latency.txt
Created September 13, 2012 18:42 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 4K randomly from SSD* 150,000 ns 0.15 ms
@SEJeff
SEJeff / the-case-for-go.txt
Created September 20, 2012 00:33
The case for Go #golang
Go at Heroku
http://blog.golang.org/2011/04/go-at-heroku.html
Rob Pike on how Go fits into today's computing environment
http://radar.oreilly.com/2012/09/golang.html
Why you PHP guys should learn Golang
http://www.mikespook.com/2012/08/why-you-php-guys-should-learn-golang/
Why I went from python to go and not node js
@SEJeff
SEJeff / pillar-data
Created November 30, 2012 15:27
Alternate Pip install of Diamond
message_do_not_modify: Do not edit this file, this is handled by Salt
graphite_address: 127.0.0.1
#!/bin/sh
#
# For each ref, validate the commit.
#
# - It disallows deleting branches without a /.
# - It disallows non fast-forward on branches without a /.
# - It disallows deleting tags without a /.
# - It disallows unannotated tags to be pushed.
domain (ip ip6) {
table filter {
chain INPUT {
policy DROP;
# connection tracking
mod state state INVALID DROP;
mod state state (ESTABLISHED RELATED) ACCEPT;
# allow local packet
'pkg_repo.epel':
pkg.installed:
- name: 'epel-release'
- sources:
- 'epel-release': 'http://fedora-epel.mirror.lstn.net/6/i386/epel-release-6-7.noarch.rpm'
@SEJeff
SEJeff / init.sls
Created February 4, 2013 17:46 — forked from thekuffs/init.sls
mysql_dirs:
file:
- directory
- mode: 644
- makedirs: True
- names:
- /etc/mysql
- /data/mysql-data
- /data/cluster-data
- /data/cluster-data/backup
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Salt returner that report error back to sentry
Pillar need something like:
deployment:
sentry_dsn: foobar