Andrew is a full stack developer. He spends most of his days programming in Ruby, Node.js, contributing to open source projects and organising local developer user groups. He also aspires to one day take over the world with a fleet of JavaScript powered quadcopters. His nickanme is about guitars, not fishes!
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> | |
| <head> | |
| <title>Livestream API for web developers - example</title> | |
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | |
| <script type="text/javascript" src="swfobject.js"></script> | |
| <script type="text/javascript"> | |
| flashvars = { channel: 'mogulusbackstage' }; | |
| params = { AllowScriptAccess: 'always' }; |
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
| # Make port 80 "real life" speeds | |
| # You can also use Mongrel ports. | |
| function slow_port { | |
| # Set the port variable if no port inputted. Defaulted to 80 (for Passenger). | |
| if [ -z "$1" ] | |
| then port=80 | |
| else port=$1 | |
| fi | |
| # Slow the ports. |
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
| <script type="text/javascript"> | |
| google.load("jquery", "1.3.2"); | |
| </script> | |
| <script type="text/javascript"> | |
| function show_last_track(JSONdata) { | |
| var last_track = JSONdata.recenttracks.track; | |
| var track_artist = last_track.artist['#text']; | |
| var track_name = last_track.name; | |
| var track = track_artist + " - " + track_name; |
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
| before "deploy:rollback:revision", "thinking_sphinx:stop_gracefully" | |
| after "deploy:default", "thinking_sphinx:symlink" | |
| after "deploy:default", "thinking_sphinx:ready" | |
| namespace :thinking_sphinx do | |
| task :stop_gracefully do | |
| begin | |
| thinking_sphinx.stop | |
| rescue | |
| puts "ThinkingSphinx is not running. No stop required." |
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
| ##In test file | |
| #setup do | |
| # load_scenario("bookshop_a") | |
| #end | |
| # | |
| #test "Franks has 5 books" do | |
| # assert_equal 5, @frank.books.count | |
| #end | |
| # |
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
| // A very mini jQuery highsrc/lowsrc plugin | |
| // | |
| // By Zach Inglis (zachinglis.com) | |
| // With credits to Ian Norton () | |
| // | |
| // Example: | |
| // <img src="logo.png" highsrc="logo.svg" /> | |
| // | |
| jQuery(document).ready(function () { | |
| // Retina Change |
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
| ~/sites $ mv hybridconf hybrid-2013 | |
| ~/sites $ mkdir hybridconf |
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
| window.console.loge = function(msg) { | |
| var gifs = [ | |
| 'http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-wink-212.gif', | |
| 'http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-shake-space-212.gif', | |
| 'http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-peepers-212.gif', | |
| 'http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-prizza-212.gif', | |
| 'http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-hat-212.gif', | |
| 'http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-gradient-212.gif', | |
| 'http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-fat-212.gif', | |
| 'http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-rainbow-212.gif', |
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
| .panel { | |
| // Base styles | |
| &-important { | |
| @extend .panel; | |
| background: { | |
| color: red; | |
| } | |
| } |