This file contains 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 | |
# cheap and cheerful pushing of files to TiddlySpace, | |
# authorization taken from the variable TIDDLYSPACE_AUTH which for me is: | |
# export TIDDLYSPACE_AUTH='-u myuser:mypass' | |
# usage: sts spacename file1 file2 .. | |
space="$1" ; shift | |
tiddler="$1" ; | |
# public/private |
This file contains 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
var simpleDate = (function() { | |
var measures = { | |
second: 1, | |
minute: 60, | |
hour: 3600, | |
day: 86400, | |
week: 604800, | |
month: 2592000, | |
year: 31536000 |
This file contains 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
Storage.prototype.setObject = function(key, value) { | |
this.setItem(key, JSON.stringify(value)); | |
}; | |
Storage.prototype.getObject = function(key) { | |
return this.getItem(key) && JSON.parse(this.getItem(key)); | |
}; |
This file contains 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
jj.createCreature('butterfly_colmjude', function (creature) { | |
// Give your creature a size. | |
creature.size({width: 50, height: 50}); | |
var element = creature.el; | |
jj.jQuery("<img src='http://colmjude.com/images/butterfly.svg'/>") | |
.css({'width': '100%', 'height': '100%'}) | |
.prependTo(element); | |
This file contains 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
/* | |
Usage: | |
@include keyframes(animate) { | |
0% { left: 0%; } | |
100% { left: 100%; } | |
} | |
*/ | |
@mixin keyframes($name) { | |
@-webkit-keyframes $name { @content; } | |
@-moz-keyframes $name { @content; } |
This file contains 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
/* Usage: | |
@include vendor-prefix(border-radius, 2px); | |
*/ | |
@mixin vendor-prefix($name, $argument) { | |
@each $prefix in -webkit-, -moz-, -ms-, -o-, '' { | |
#{$prefix}#{$name}: $argument; | |
} | |
} | |
/* Usage: |
This file contains 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($) { | |
console.log( $("#trigger-overlay") ); | |
var hls = $(".yourHighlight"); | |
var book = $(".bookMain"); | |
var quotes = []; | |
hls.each(function(el, ind, arr) { | |
var hl = { | |
"highlight": el.find(".highlight").text(), | |
"title": book.find(".title a").text(), |
This file contains 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 | |
OLDPWD=$(pwd) | |
cd apps/service-frontend/ && ./create-user-for-integration-tests.sh && cd "$OLDPWD" | |
cd apps/casework-frontend/ && ./create-user-for-integration-tests.sh && cd "$OLDPWD" | |
if [ -z "$1" ] ; then | |
echo "No argument supplied; loading 1 title" | |
cd apps/generate-test-data/ && ./load_test_data_into_dev_environment.sh 1 && cd "$OLDPWD" | |
else |
This file contains 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
module PensionsCalculator | |
class RioCalc | |
def initialize(potsize) | |
@potsize = potsize | |
end | |
def run_calc() | |
person = PensionsCalculator::Person.new; | |
person.salary = 50000; |
This file contains 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
module PensionsCalculator | |
class RioCalc | |
def initialize(potsize) | |
@potsize = potsize | |
end | |
def run_calc() | |
person = PensionsCalculator::Person.new; | |
person.salary = 50000; |
OlderNewer