Skip to content

Instantly share code, notes, and snippets.

View revans's full-sized avatar
🤠
Building Businesses

Robert Evans revans

🤠
Building Businesses
View GitHub Profile
require 'minitest/unit'
require 'minitest/spec'
require 'ansi'
class MiniTest::Unit
include ANSI::Code
PADDING_SIZE = 4
def run(args = [])
/*
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
// Tab Highlighting Function
//
// Usage:
//
// $(document).ready(function(){
// $.tab_highlight();
// });
//
(function($) {
$.tab_highlight = function() {
(function () {
//
// hijs - JavaScript Syntax Highlighter
//
// Copyright (c) 2010 Alexis Sellier
//
// All elements which match this will be syntax highlighted.
var selector = 'code';
#!/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}:" "$@"; }
#!/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
#!/bin/bash
hostname $1
echo $1 > /etc/hostname
=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
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