Skip to content

Instantly share code, notes, and snippets.

View chuckwagoncomputing's full-sized avatar

David Holdeman chuckwagoncomputing

View GitHub Profile
@chuckwagoncomputing
chuckwagoncomputing / README.md
Last active November 28, 2015 01:20
WebAdd - Add up dollar values from a website

WebAdd

Script to add up dollar values from a website

webadd Test Example

webadd gets the dollar value from every line and adds them. If there is more than one dollar value on a line. you can select which one you want. Spaces or other characters between the dollar sign and numbers are not allowed.

#
# Initialize the stuff
#
# We build the status bar item menu
framework 'AppKit'
def setupMenu
menu = NSMenu.new
menu.initWithTitle 'FooApp'
mi = NSMenuItem.new
mi.title = 'Hellow from MacRuby!'
@chuckwagoncomputing
chuckwagoncomputing / gist:5008838
Last active December 14, 2015 01:49
Raking shoes on Mac OS X 10.5.8
(in /Users/brysonholdeman/shoes)
** Invoke default (first_time)
** Invoke build (first_time)
** Invoke osx:build (first_time)
** Invoke osx:build_tasks:pre_build (first_time)
** Invoke osx:build_tasks:check_ruby_arch (first_time)
** Execute osx:build_tasks:check_ruby_arch
** Execute osx:build_tasks:pre_build
** Invoke build_skel (first_time)
** Execute build_skel
@chuckwagoncomputing
chuckwagoncomputing / test.rb
Created May 1, 2013 23:12
Camping OpenID Fail
Camping.goes :Test
module Test::Controllers
class Home < R '/'
def get
render :home
end
end
class Login < R '/openid'
def get
@chuckwagoncomputing
chuckwagoncomputing / test.rb
Created May 1, 2013 23:12
Camping OpenID Fail Minimal
Camping.goes :Test
module Test::Controllers
class Login < R '/'
def get
require 'openid'
@state.openid_request = Hash.new
oid_request = OpenID::Consumer.new(@state.openid_request, nil).begin(input.identity)
'You made it home.'
end
end
@chuckwagoncomputing
chuckwagoncomputing / jargon.sh
Last active December 17, 2015 07:29
symbol jargon translator
#!/bin/bash
while true; do
read LINE
echo "$LINE" | while IFS= read -r -n1 i; do
case $i in
"<"|">")
echo -n "waka "
;;
"!")
echo -n "bang "
@chuckwagoncomputing
chuckwagoncomputing / log.txt
Created May 24, 2013 01:56
JeweryBox gem install errors
mkdir: : No such file or directory
Installing gems listed in /tmp/jewelrybox_gemstack-675292940.gems file...
installing mkdir: .....
..
@chuckwagoncomputing
chuckwagoncomputing / xmltags.sh
Created June 27, 2013 21:07
Execution of functions from xml tags
xidel $1 -e 'xquery version "1.0"; for $i in //* return concat(name($i), " ", $i, "&#x00;")' | while read -d $'\0' i; do if `type $(echo $i | cut -d " " -f 1) 2> /dev/null | grep function` >> /dev/null; then $i; else :; fi; done
@chuckwagoncomputing
chuckwagoncomputing / error.log
Created July 11, 2013 17:16
camping init.d error
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/camping-2.1.554/lib/camping/server.rb:40:in `expand_path': no implicit conversion of nil into String (TypeError)
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/camping-2.1.554/lib/camping/server.rb:40:in `<class:Options>'
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/camping-2.1.554/lib/camping/server.rb:28:in `<class:Server>'
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/camping-2.1.554/lib/camping/server.rb:27:in `<module:Camping>'
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/camping-2.1.554/lib/camping/server.rb:26:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/camping-2.1
@chuckwagoncomputing
chuckwagoncomputing / infun.sh
Created August 10, 2013 16:53
Text insertion in functions
#!/bin/bash
LINE=$((`grep -n "$2()" $1 | head -c 1`+1))
./insert.sh $1 $LINE "$3"
exit