Skip to content

Instantly share code, notes, and snippets.

View parabuzzle's full-sized avatar

Mike Heijmans parabuzzle

View GitHub Profile
class Event < ActiveRecord::Base
belongs_to :user
belongs_to :group
end
#!/bin/sh
cip=`ifconfig eth0.1 | grep inet | cut -d ':' -f 2 | awk 'NR==1{print $1}'`
lip=`nslookup hostname.homeunix.net| grep Address | cut -d ' ' -f 2 | awk 'NR==2{print $1}' `
if [ x$cip != x$lip ]; then
/bin/update_dyndns.sh
else
echo "good"
fi
#Git Branch Parsing
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
#Set color codes
function proml {
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
#!/bin/sh
#
#This script pushes your public keys to a remote host.
#
#Created by Mike Heijmans - parabuzzle@yahoo.com
host=$1
username=""
#test for host
wrong number of arguments (4 for 3)
/Users/mike/.gem/ruby/1.8/gems/grit-1.0.0/lib/grit/repo.rb:248:in `diff'
/Users/mike/.gem/ruby/1.8/gems/grit-1.0.0/lib/grit/repo.rb:248:in `diff'
app/controllers/repo_controller.rb:24:in `diffs'
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1162:in `perform_action_without_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:580:in `call_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:573:in `perform_action_without_benchmark'
#!/bin/bash
#
### BEGIN INIT INFO
# Provides: iptables-config
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: load and unload iptables config
# Description: loads the firewall.config file in to iptables and flushs iptables
### END INIT INFO
Protocol 2,1
StrictHostKeyChecking no
CheckHostIP no
Host *
User heijmans
#!ruby
#
# A simple script to figure out the key of a song based on the scale that fits
# Probably many better ways of doing this but it works
#Setup Major scales
@keys = Hash.new
@keys.store('c_major',["a","b","c","d","e","f","g"])
@keys.store('g_major',["a","b","c","d","e","fs","g"])
@keys.store('d_major',["a","b","cs","d","e","fs","g"])
#
# ini for git
#
[user]
name = "Bart Trojanowski"
email = "bart@jukie.net"
editor = vim
signingkey = 2289688F
open(blogrss) do |s|
content = ""
while s.eof? != true
content << s.read
end
end
#### Diff of production vs. development