Skip to content

Instantly share code, notes, and snippets.

View ratbeard's full-sized avatar

Mike Frawley ratbeard

View GitHub Profile
#!/bin/bash
if [ -z "${SAUCE_USERNAME}" ] || [ -z "${SAUCE_ACCESS_KEY}" ]; then
echo "This script can't run without your Sauce credentials"
echo "Please set SAUCE_USERNAME and SAUCE_ACCESS_KEY env variables"
echo "export SAUCE_USERNAME=ur-username"
echo "export SAUCE_ACCESS_KEY=ur-access-key"
exit 1
fi
SAUCE_TMP_DIR="$(mktemp -d -t sc.XXXX)"
module.exports = (generate) ->
{register, copy, mkdir, set, camelcase} = generate
# Register all generators in 1 file
# Templates are run through a <%= %>
# args are automatically 'set' and available inside templates
# extend string prototype w/ handy helpers
# need a --dry-run options
register(name: "bot", args: "<name>", run: (args) ->
mkdir("src/bots/<%= name.camelcase %>")
/*!
* toggleAttr() jQuery plugin
* @link http://github.com/mathiasbynens/toggleAttr-jQuery-Plugin
* @description Used to toggle selected="selected", disabled="disabled", checked="checked" etc…
* @author Mathias Bynens <http://mathiasbynens.be/>
*/
;(function($) {
$.fn.toggleAttr = function(attr) {
return this.each(function() {
$(this).attr(attr) ? $(this).removeAttr(attr) : $(this).attr(attr, attr);
require 'ipaddr'
module Rack
#
# BanHammer is a Rack middleware app that restricts access to your server
# using a black-list of IPv4/IPv6 addresses and ranges.
#
# MIT License - Hal Brodigan (postmodern.mod3 at gmail.com)
#
# Needlessly modified by Mike Frawley
We couldn’t find that file to show.
# assumes you've got a copy of 'who let the dogs out' in your tmp dir
require 'rubygems'
require 'rest_client'
$url = "http://www.brownpapertickets.com/event/72123"
def site_up?
RestClient::get($url) rescue false
end
describe 'Creating a Sheet...'
setup_page(1, function () {
pane = new Ext.ux.NewSheet()
area = display(pane, '#new-sheet')
form = pane.items.get(0).getForm();
^
.., must specify a unique sheet id ...
.., in an input box
# `irb` console session.
# Making a class, making it comparable, overriding its display formats, and using map!
# Make a class that mixins Comparable and defines <=> so it gets all <, ==, >, etc.
# Other methods like Array.sort will now work too
>> class Box
>> def <=>(other)
>> [source, color] <=> [other.source, other.color]
>> end
# see http://troy.yort.com/short-fast-micro-whois
# original http://gist.github.com/82956
# 0 if available
# 1 if taken
d () {
# Append ".com" to input if doesn't contain a ".":
domain=$1
if [[ ! $1 =~ \.\w+$ ]]; then
domain=$domain.com
fi