Skip to content

Instantly share code, notes, and snippets.

View mstrauss's full-sized avatar

Markus Strauss mstrauss

View GitHub Profile
@mstrauss
mstrauss / scrape_links.rb
Created December 14, 2010 16:49
Scrape Google Links (Files names 01.html .. 10.html)
@mstrauss
mstrauss / partition-sdc.sh
Created December 14, 2010 17:24
Partition with correct NetApp alignment (4k block size)
sfdisk -uS /dev/sdc <<EOF
64
0,0
0,0
0,0
EOF
@mstrauss
mstrauss / gist:786044
Created January 19, 2011 11:36
a script for updating debian boot images
#!/usr/bin/env ruby
require 'fileutils'
include FileUtils
dists = [ 'lenny', 'squeeze' ]
basenames = [ 'i386', 'amd64' ]
files = [ 'linux', 'initrd.gz' ]
progdir = File.expand_path(File.dirname(__FILE__))
@mstrauss
mstrauss / Gemfile
Created February 17, 2011 20:58
Gemfile for Wagn 1.5.2 (use with Bundler)
source :rubygems
gem "rails", "=2.3.5"
gem "uuid", "=2.3.1"
gem "json", "=1.4.6"
gem "htmlentities", "=4.2.1"
gem "ruby-openid", ">= 2.0.4"
gem "mysql", "=2.8.1"
@mstrauss
mstrauss / Gemfile.lock
Created February 17, 2011 21:03
Gemfile.lock for Wagn 1.5.2 (use with Bundler)
GEM
remote: http://rubygems.org/
specs:
actionmailer (2.3.5)
actionpack (= 2.3.5)
actionpack (2.3.5)
activesupport (= 2.3.5)
rack (~> 1.0.0)
activerecord (2.3.5)
activesupport (= 2.3.5)
@mstrauss
mstrauss / .emacs
Created February 19, 2011 17:30
my personal emacs prefs
(setq make-backup-files nil)
;; Interactively Do Things (highly recommended, but not strictly required)
(require 'ido)
(ido-mode t)
;; Rinari
(add-to-list 'load-path "~/.emacs.d/rinari")
(require 'rinari)
@mstrauss
mstrauss / bootstrap-puppet.sh
Created August 24, 2011 19:20
Bootstrap Puppet on Debian/Ubuntu
#!/bin/sh
# Installs Puppet on a naked Debian Lenny/Squeeze, Ubuntu
GEMS_VERSION=1.8.17
PUPPET_VERSION="~>2.7.0"
if [ -n "$http_proxy" -a -z "$https_proxy" ]; then
echo "Have http_proxy but no https_proxy. Setting https_proxy to ${http_proxy}."
export https_proxy=$http_proxy
fi
@mstrauss
mstrauss / gist:1210476
Created September 12, 2011 02:34
Restore sudoers File on Mac OS after adversely deleting it :-(
do shell script "echo '%admin ALL=(ALL) ALL' > /etc/sudoers" with administrator privileges
@mstrauss
mstrauss / gist:1217470
Created September 14, 2011 19:08
brew install -v fio
==> Downloading http://brick.kernel.dk/snaps/fio-1.37.tar.bz2
File already downloaded in /Users/markus/Library/Caches/Homebrew
/usr/bin/tar xf /Users/markus/Library/Caches/Homebrew/fio-1.37.tar.bz2
==> make -f Makefile.mac prefix=/usr/local/Cellar/fio/1.37 && make -f Makefile.mac prefix=/usr/local/Cellar/fio/1.37 install
make -f Makefile.mac prefix=/usr/local/Cellar/fio/1.37 && make -f Makefile.mac prefix=/usr/local/Cellar/fio/1.37 install
CC gettime.o
CC fio.o
CC ioengines.o
CC init.o
CC stat.o
@mstrauss
mstrauss / gist:1226427
Created September 19, 2011 12:46
Recursevly clear the user immutable flag (Mac OS X)
chflags -R nouchg *