This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// simple interface expecting data from serial | |
// provided by ardy.rb | |
// | |
// pin states: | |
// 48 = ok | |
// 49 = bad | |
// | |
// originated by mike heijmans | |
int ledPin = 13; // which pin do I control? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
validate :test | |
def test | |
unless column.nil? | |
...do your test... | |
end | |
return true | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open(blogrss) do |s| | |
content = "" | |
while s.eof? != true | |
content << s.read | |
end | |
end | |
#### Diff of production vs. development |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# ini for git | |
# | |
[user] | |
name = "Bart Trojanowski" | |
email = "bart@jukie.net" | |
editor = vim | |
signingkey = 2289688F |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!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"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Protocol 2,1 | |
StrictHostKeyChecking no | |
CheckHostIP no | |
Host * | |
User heijmans |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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\]" |