Skip to content

Instantly share code, notes, and snippets.

View chuckwagoncomputing's full-sized avatar

David Holdeman chuckwagoncomputing

View GitHub Profile
@chuckwagoncomputing
chuckwagoncomputing / ifchanged.sh
Created November 20, 2012 17:44
shell script to check results of command
badopts()
{
echo -e "Usage: ifchanged [command to check] [number of seconds to wait between checks] [command to execute if not changed] [command to execute if changed]"
exit
}
if [ $# -ne 4 ]
then
badopts
else
while true
@chuckwagoncomputing
chuckwagoncomputing / Paypal_error.txt
Created November 20, 2012 23:05
PayPal iOS app console error
Tue Nov 20 16:47:25 PayPal[30597] <Error>: *** -[__NSCFCalendar components:fromDate:toDate:options:]: fromDate cannot be nil
I mean really, what do you think that operation is supposed to mean with a nil fromDate?
An exception has been avoided for now.
A few of these errors are going to be reported with this complaint, then further violations will simply silently do whatever random thing results from the nil.
Here is the backtrace where this occurred this time (some frames may be missing due to compiler optimizations):
(
0 CoreFoundation 0x3a1d948f <redacted> + 86
1 PayPal 0x0019981b -[PPKBCheckInManager nearbyMerchantRefresh] + 162
2 PayPal 0x0018833f -[PPMerchantListingsViewController viewWillAppear:] + 1414
3 UIKit 0x333cb319 <redacted> + 136
@chuckwagoncomputing
chuckwagoncomputing / randprog.sh
Created November 29, 2012 23:40
Random Program opener shell script
#!/bin/bash
LINES=`cat $1 | wc -l`
LINESB=`echo $((RANDOM % LINES))`
WHICH=`echo $((LINESB + 1))`
COM=`cat $1 | head -n $WHICH | tail -n 1`
eval $COM
exit
@chuckwagoncomputing
chuckwagoncomputing / error.log
Created December 3, 2012 21:37
Emoticon in Error message iOS
2012-12-03 21:35:26 +0000 assistant_service the local store doesn't allow tasks and we have no default calendar :(
@chuckwagoncomputing
chuckwagoncomputing / gist:4234127
Last active February 2, 2024 14:25 — forked from matthew-french/gist:4234076
pbcopy ssh public key to your clipboard
#pbcopy < ~/.ssh/id_rsa.pub
#or
cat ~/.ssh/id_rsa.pub | pbcopy
#
# 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