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
require 'ruby-processing' | |
class Radiohead < Processing::App | |
load_libraries :opengl, :video | |
include_package "processing.opengl" | |
include_package "processing.video" | |
def setup | |
render_mode OPENGL |
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
require 'rubygems' | |
require 'pp' | |
# ------- | |
cond1 = { | |
:type => 'transaction_field', | |
:params => { | |
:field => 'store_id', | |
:operator => 'equals', | |
:value => 9 |
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
///////////////////////////////////// | |
// In the promotion rule application: | |
rule = new Rule(); | |
rule.callbacks.get_condition_options = function(type, property, operator, value) { | |
// Make AJAX call to services: | |
// GET /promos/rules/options?type=type&property=property&operator=operator&value=value | |
// Parse the server response into whatever return format is expected of this type of | |
// callback function (as defined by the general purpose rule system) |
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
json = getJsonFromServer(); | |
rule = Rule.from_json(json) | |
rule.condition_set | |
html = getHtmlRepresentation(); | |
rule = Rule.from_html(html) | |
rule.condition_set |
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
# rake/cap task completion | |
export COMP_WORDBREAKS=${COMP_WORDBREAKS/\:/} | |
_rakecomplete() { | |
COMPREPLY=($(compgen -W "`rake -s -T 2>/dev/null | awk '{{print $2}}'`" -- ${COMP_WORDS[COMP_CWORD]})) | |
return 0 | |
} | |
complete -o default -o nospace -F _rakecomplete rake |
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
12345 MY REALLY REALLY REALLY 123.99 | |
REALLY REALLY LONG DESC | |
RIPTION |
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 buffered_write(func) { | |
var old_write = document.write; | |
var buffer = ''; | |
document.write = function(string) { | |
buffer += string; | |
}; | |
func(); | |
document.write = old_write; | |
return buffer; | |
} |
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 buffered_write(func) { | |
var old_write = document.write; | |
var buffer = ''; | |
document.write = function(string) { | |
buffer += string; | |
}; | |
func(); | |
document.write = old_write; | |
return buffer; | |
} |
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
// ==UserScript== | |
// @name Lemmingtrail Image Inliner | |
// @namespace http://jasonstotz.com/ | |
// @version 0.0.1 | |
// @include http://*.lemmingtrail.com/* | |
// @include http://lemmingtrail.com/* | |
// ==/UserScript== | |
(function () { | |
var regex = /<a href="([^"]*)" class="tr1">IMAGE\s*REMOVED\s*-\s*CLICK\s*TO\s*VIEW<\/a>/g; |
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
inthepink@inthepink1:~$ gem list | |
*** LOCAL GEMS *** | |
actionmailer (1.3.5) | |
Service layer for easy email delivery and testing. | |
actionpack (1.13.5) | |
Web-flow and rendering framework putting the VC in MVC. |
OlderNewer