Skip to content

Instantly share code, notes, and snippets.

@guitsaru
guitsaru / dotenv
Last active September 20, 2016 23:12 — forked from doughsay/dotenv
Dotenv bash helpers
#!/bin/bash
export DOTENV_ENV=${DOTENV_ENV:-dev}
GIT_DIR=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
DOTENV_FILE=$GIT_DIR/.env.$DOTENV_ENV
if [ -e $DOTENV_FILE ]; then source $DOTENV_FILE; fi
$@
class Tournament < ActiveRecord::Base
include Bracket::Swiss # (OR Bracket::KOTH OR Bracket::SingleElimination etc)
end
module Bracket
module KOTH
def self.included(base)
base.workflow do
# state and events for a king of the hill tournament
end
$(document).ready(function() {
$('#featured-location-0').show();
$("#ww_img").hover(
function () {
timer.stop();
},
jQuery.timer(200, function(timer) {
var current = parseInt($('.featured:visible').attr('id').split('-')[2]);
<form name="mailing_list">
<input type="text" name="email" id="emailform">
<input type="button" id="go" value="Go!" onclick="subscribe();">
</form>
<script language="javascript">
function subscribe() {
var xmlhttp = new XMLHttpRequest();
xmlhttp.open('POST', 'http://redlists.com/subscriptions/create', true);
xmlhttp.send("<?xml version='1.0' encoding='UTF-8'?><subscription><list_id>16</list_id><email>" +