I hereby claim:
- I am shad on github.
- I am shadr (https://keybase.io/shadr) on keybase.
- I have a public key whose fingerprint is 7CBC 5E71 1662 E5AE D322 9809 DC8A 9DF7 BA30 351F
To claim this, I am signing this object:
// this is a function! | |
function foo(bar) { | |
return 'baz'; | |
} |
I hereby claim:
To claim this, I am signing this object:
# Simulate a really poor network connection on your mac (with support for pow.cx backend) | |
namespace :network do | |
task :status do | |
sh 'sudo ipfw show' | |
end | |
task :bad => [:good] do | |
# Add a new pipe | |
sh 'sudo ipfw add pipe 1 all from any to any' | |
# Configure the pipe to only do 50Kbit/s, with typical delays of 2000ms and 90% packet drop rate! | |
sh 'sudo ipfw pipe 1 config bw 50Kbit/s delay 2000ms plr 0.9' |
$~/Library/Application\ Support/Titanium/mobilesdk/osx/1.7.5/iphone/builder.py simulator "4.2" "." <MY-APP-ID> "My Cool App" iphone | |
...lines ommitted... | |
[INFO] Performing clean build | |
[ERROR] Error: Traceback (most recent call last): | |
File "/Users/shad/Library/Application Support/Titanium/mobilesdk/osx/1.7.5/iphone/builder.py", line 1093, in main | |
recompile = copy_tiapp_properties(project_dir) | |
File "/Users/shad/Library/Application Support/Titanium/mobilesdk/osx/1.7.5/iphone/builder.py", line 408, in copy_tiapp_properties | |
shutil.copy(os.path.join(project_dir, 'tiapp.xml'), assets_tiappxml) |
~/Library/Application\ Support/Titanium/mobilesdk/osx/1.7.3/iphone/builder.py simulator "4.2" "." 554UNEM399 "Meal Planning by Food on the Table" iphone | grep -v "^$" | |
File "/Users/shad/Library/Application Support/Titanium/mobilesdk/osx/1.7.3/iphone/builder.py", line 1325 | |
if command in ['simulator', 'build']: | |
^ | |
IndentationError: expected an indented block | |
rake aborted! | |
Command failed with status (1): [~/Library/Application\ Support/Titanium/mo...] |
// Log info about the window and memory on close | |
function logClose(event) { | |
var closingWindow = event.source; | |
Ti.API.info('close window (' + closingWindow.title +') : ' + Ti.Platform.availableMemory); | |
} | |
// Create a row with a couple of subviews | |
function createRow(spec) { | |
var row = Ti.UI.createTableViewRow({ | |
hasChild: true, | |
className:'foo' |
/* | |
* setTimeout | |
* | |
* Sometimes, we want to set a timeout and associate the timeout with | |
* an element. This is essential for operations that open menus, popups | |
* flyovers, etc. | |
* | |
* Shad Reynolds | |
* http://shad.github.com | |
*/ |
# Improved "puts" in Textmate's version of rspec | |
if ENV['TM_MODE'] == 'RSpec' | |
alias :orig_puts :puts | |
def puts(str) | |
str = '[nil]' if str.nil? | |
str = '' if str.blank? | |
url, line = caller[0].split(":") | |
md = caller[0].match(/[\\\/]([^\\\/]*:\d+):(.*)/) | |
link_text = md[1] | |
title = md[2] |
// from http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes | |
(function () { | |
if (typeof LANGUAGE_CODES === 'undefined') { | |
window.LANGUAGE_CODES = [ | |
{code:'aa', name:'Afar'}, | |
{code:'ab', name:'Abkhazian'}, | |
{code:'ae', name:'Avestan'}, | |
{code:'af', name:'Afrikaans'}, | |
{code:'ak', name:'Akan'}, | |
{code:'am', name:'Amharic'}, |
(function () { | |
var mylib = {}; | |
window.MYLIB = mylib; | |
}); |