This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*! | |
| * RequireJS plugin for async dependency load like JSONP and Google Maps | |
| * @author Miller Medeiros | |
| * @version 0.0.1 (2011/03/23) | |
| * Released under the MIT License <http://www.opensource.org/licenses/mit-license.php> | |
| */ | |
| define(function(){ | |
| function injectScript(src){ | |
| var s, t; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| var origDefine = define; | |
| function redefine(name, definitions) { | |
| return function (prereqs, definition) { | |
| if (arguments.length > 2) { | |
| throw new Error('Cannot have more than two arguments to define in ' + name); | |
| } else if (arguments.length === 1) { | |
| definition = prereqs; | |
| prereqs = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| For more detailed instructions on how to use this script, sign up with your email here: | |
| http://adamloving.com/internet-programming/how-toexport-facebook-page-fans | |
| DISCLOSURE: This javascript runs in your browser pretending to be you | |
| looking through your page fans. Facebook should have no problem with this, | |
| but who knows if they will think it is strange to see you looking through | |
| all your fans so quickly (the script waits 3s before requesting each page). | |
| I've had no problem running this so far for 1000s of page fans, but I |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # EngineYard AppCloud before_symlink to copy public files to S3 | |
| # lives in $RAILS_ROOT/deploy/before_symlink.rb | |
| # | |
| # Only need to run once | |
| on_app_master do | |
| aws_bucket = "<BUCKET_NAME>" | |
| aws_access_key = "<YOUR ACCESS ID>" | |
| aws_secret_key = "<YOUR SECRET KEY>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Add a Mustache.js templating function to your JavaScript: | |
| Mustache.template = function(templateString) { | |
| return function () { | |
| if (arguments.length < 1) { | |
| // With no arguments, return the raw template -- useful for rendering | |
| // partials. | |
| return templateString; | |
| } else { | |
| return Mustache.to_html(templateString, arguments[0], arguments[1]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # My record of provisioning a Solr server on EC2 (mostly mistakes): | |
| # Take 2: | |
| ## AMI: ami-1515f67c (bare ubuntu) | |
| sudo apt-get update | |
| sudo apt-get install rubygems1.8 | |
| sudo apt-get install git-core | |
| git clone git://github.com/JackDanger/jackbash.git ./.bash | |
| source ~/.bash/rc |
NewerOlder