Skip to content

Instantly share code, notes, and snippets.

View dannycroft's full-sized avatar

Danny Croft dannycroft

View GitHub Profile
@dannycroft
dannycroft / duckduck.js
Created May 7, 2012 15:36
CasperJS Test
// Add a title comment so that you know what's happening and when
casper.test.comment('DuckDuckGo - Homepage');
// Setup any variables you may need. In this case we need a search term
var search_term = "speed of an unladen swallow";
// Start casper running on a web page, in this case the awesome
// duckduckgo seach engine.
casper.start('http://duckduckgo.com/', function () {
cd ~/Desktop
mkdir unit_tests
cd unit_tests
touch duckduck.js
@dannycroft
dannycroft / gist:2628452
Created May 7, 2012 15:33
Verify that everything is installed in a suitable place
which brew && which casperjs && which phantomjs
@dannycroft
dannycroft / gist:2628443
Created May 7, 2012 15:33
Check CasperJS has installed
casperjs --version
@dannycroft
dannycroft / gist:2628431
Created May 7, 2012 15:32
Create a link to the CasperJS source file
ln -sf `pwd`/bin/casperjs /usr/local/bin/casperjs
@dannycroft
dannycroft / gist:2628427
Created May 7, 2012 15:31
Access CasperJS and checkout the latest version
cd casperjs/ && git checkout tags/0.6.6
@dannycroft
dannycroft / gist:2628419
Created May 7, 2012 15:29
Download CasperJS
git clone git://github.com/n1k0/casperjs.git
@dannycroft
dannycroft / gist:2628393
Created May 7, 2012 15:25
Has PhantomJS installed
phantomjs -v && phantomjs -h
@dannycroft
dannycroft / gist:2628391
Created May 7, 2012 15:24
Install PhantomJS with brew
brew install phantomjs
@dannycroft
dannycroft / gist:2628383
Created May 7, 2012 15:23
Has Homebrew installed
brew -v && brew help