Skip to content

Instantly share code, notes, and snippets.

View goofmint's full-sized avatar

Atsushi goofmint

View GitHub Profile
@goofmint
goofmint / gist:1169759
Created August 25, 2011 01:34
Facebook photo uploader
log = (obj) -> Ti.API.log obj
Ti.UI.setBackgroundColor '#000'
# create tab group
tabGroup = Ti.UI.createTabGroup()
# Base window
win = Ti.UI.createWindow title: 'Photo Uploader', backgroundColor: '#fff'
@goofmint
goofmint / bugspots install
Created January 11, 2012 02:43
bugspots install on Mac OSX
$ gem install bugspots
Fetching: mime-types-1.17.2.gem (100%)
Fetching: diff-lcs-1.1.3.gem (100%)
Fetching: grit-2.4.1.gem (100%)
Fetching: rainbow-1.1.3.gem (100%)
Fetching: bugspots-0.1.0.gem (100%)
Successfully installed mime-types-1.17.2
Successfully installed diff-lcs-1.1.3
Successfully installed grit-2.4.1
Successfully installed rainbow-1.1.3
@goofmint
goofmint / bugspots result
Created January 11, 2012 02:47
bugspots sample result
$ git bugspots .
Scanning . repo
Found 43 bugfix commits, with 177 hotspots:
Fixes:
- Fix link
- Fix comment
:
- Fix URL
@goofmint
goofmint / gist:1593035
Created January 11, 2012 04:33
svn-bugspots result
$ svn-bugspots .
Scanning . repo
Found 7 bugfix commits, with 21 hotspots:
Fixes:
- * Diff view interface added.
* Comment model fixed.
* Ajax method fixed(not finished).
- * Bug fix.
$ git clone git://github.com/takanorig/bugspots-svn.git
$ cd bugspots-svn
$ gem build bugspots-svn.gemspec
$ sudo gem install --force bugspots-svn-0.1.0.beta.gem
// Convert CSV data into array of arrays
jQuery.csv()("1,2,3\n4,5,6\n7,8,9\n"); // = [ [1,2,3], [4,5,6], [7,8,9] ]
// It handles quotes
jQuery.csv()('a,"b,c",d'); // = [ ['a', 'b,c', 'd'] ]
// You can use any delimiter, e.g. tab
jQuery.csv("\t")("a\tb\nc\td\n"); // = [ ['a','b'], ['c','d'] ]
// Quick usage with AJAX:
@goofmint
goofmint / gist:1593338
Created January 11, 2012 06:18
KIF demo code
+ (id)scenarioToSelectDifferentColors;
{
KIFTestScenario *scenario = [KIFTestScenario scenarioWithDescription:[NSString stringWithFormat:@"Select the a few different colors."]];
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Purple"]];
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Blue"]];
[scenario addStep:[KIFTestStep stepToTapViewWithAccessibilityLabel:@"Red"]];
[scenario addStep:[KIFTestStep stepToWaitForTimeInterval:5.0 description:@"An arbitrary wait just to demonstrate adding an additional step"]];
[scenario addStep:[KIFTestStep stepToWaitForViewWithAccessibilityLabel:@"Selected: Red"]];
return scenario;
@goofmint
goofmint / gist:1593601
Created January 11, 2012 07:44
Webiblo demo JSON data
{
"title" : "Structure and Interpretation of Computer Programs",
"authors" : [
"Harold Abelson",
"Gerald Jay Sussman",
"Julie Sussman"
],
"cover_image" : "http://mitpress.mit.edu/sicp/full-text/book/cover.jpg",
"content_xpath" : "//div[@class=\"content\"]", # Optional
"exclude_xpath" : "//div[@class=\"navigation\"]", # Optional
@goofmint
goofmint / gist:1625489
Created January 17, 2012 07:41
jQ.Mobi example
$("input[type='text']")
@goofmint
goofmint / gist:1625493
Created January 17, 2012 07:42
jQ.Movi example2
$("#id").hide()
$("span").bind("click",function(){console.log("clicked");});