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
require 'minitest/unit' | |
require 'minitest/spec' | |
require 'ansi' | |
class MiniTest::Unit | |
include ANSI::Code | |
PADDING_SIZE = 4 | |
def run(args = []) |
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
/* | |
Copyright (c) 2010, Patrick Wied. All rights reserved. | |
Code licensed under the BSD License: | |
http://patrick-wied.at/static/license.txt | |
*/ | |
var heatmapApp = (function(){ | |
// var definition | |
// canvas: the canvas element | |
// ctx: the canvas 2d context | |
// width: the heatmap width for border calculations |
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
// Tab Highlighting Function | |
// | |
// Usage: | |
// | |
// $(document).ready(function(){ | |
// $.tab_highlight(); | |
// }); | |
// | |
(function($) { | |
$.tab_highlight = function() { |
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 () { | |
// | |
// hijs - JavaScript Syntax Highlighter | |
// | |
// Copyright (c) 2010 Alexis Sellier | |
// | |
// All elements which match this will be syntax highlighted. | |
var selector = 'code'; |
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
#!/bin/sh | |
# | |
# runurl - Download a URL and run as a program, passing in arguments | |
# | |
# Copyright (C) 2009 Eric Hammond <[email protected]> | |
# | |
error() { echo "$@" 1>&2; } | |
fail() { [ $# -eq 0 ] || error "${BNAME}:" "$1"; exit ${2:-1}; } | |
debug() { [ "$DEBUG" = "0" ] || error "${BNAME}:" "$@"; } |
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
#!/bin/bash | |
if [[ "$1" == "add" ]]; then | |
IPADDR=`curl -s http://169.254.169.254/latest/meta-data/local-ipv4` | |
HOSTNAME=`hostname` | |
sed -i "s/127.0.0.1 localhost.localdomain localhost/127.0.0.1 localhost.localdomain localhost\n$IPADDR $HOSTNAME.clientstagingapp.com $HOSTNAME\n/g" /etc/hosts | |
fi |
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
#!/bin/bash | |
hostname $1 | |
echo $1 > /etc/hostname |
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 powlink() { | |
pwd="$(pwd)" | |
echo -e "Adding $pwd to ~/.pow" | |
cd ~/.pow && ln -s "$pwd" && cd - | |
} |
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
=radius($radius: 5px, $top: false, $side: false) | |
@if $side and $top | |
-moz-border-radius-#{$top}#{$side}: $radius | |
-webkit-border-#{$top}-#{$side}-radius: $radius | |
border-#{$top}-#{$side}-radius: $radius | |
@if $side | |
-moz-border-radius-#{$side}: $radius | |
-webkit-border-#{$side}-radius: $radius | |
border-#{$side}-radius: $radius | |
@else |
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
def determine_domain(domain) | |
domain = domain.split(':').first # if you have to worry about ports | |
case domain | |
when 'open-dev.heroku.com' then ... | |
when 'open.lifechurch.tv.dev' then ... | |
else | |
... | |
end | |
end |