Skip to content

Instantly share code, notes, and snippets.

View parabuzzle's full-sized avatar

Mike Heijmans parabuzzle

View GitHub Profile
@parabuzzle
parabuzzle / ardy.pde
Created December 2, 2011 21:39
Simple arduino interface for LED manipulation based on monitoring.
// 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?
validate :test
def test
unless column.nil?
...do your test...
end
return true
end
open(blogrss) do |s|
content = ""
while s.eof? != true
content << s.read
end
end
#### Diff of production vs. development
#
# ini for git
#
[user]
name = "Bart Trojanowski"
email = "bart@jukie.net"
editor = vim
signingkey = 2289688F
#!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"])
Protocol 2,1
StrictHostKeyChecking no
CheckHostIP no
Host *
User heijmans
#!/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
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/sh
#
#This script pushes your public keys to a remote host.
#
#Created by Mike Heijmans - parabuzzle@yahoo.com
host=$1
username=""
#test for host
#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\]"