Skip to content

Instantly share code, notes, and snippets.

View zachinglis's full-sized avatar

Zach Inglis zachinglis

View GitHub Profile
<!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' };
# 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.
<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;
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."
@zachinglis
zachinglis / scenario_blueprints.rb
Created August 22, 2011 14:15 — forked from MrJaba/scenario_blueprints.rb
Scenario Blueprints
##In test file
#setup do
# load_scenario("bookshop_a")
#end
#
#test "Franks has 5 books" do
# assert_equal 5, @frank.books.count
#end
#
// 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
@zachinglis
zachinglis / bio.md
Last active December 13, 2015 17:29 — forked from andrew/andrewnesbitt.jpeg

Andrew Nesbitt

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!

~/sites $ mv hybridconf hybrid-2013
~/sites $ mkdir hybridconf
@zachinglis
zachinglis / gist:9831849
Last active August 29, 2015 13:57
console.loge
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',
.panel {
// Base styles
&-important {
@extend .panel;
background: {
color: red;
}
}