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
If you work on or make any of these, I just wanted to say thanks. | |
I really appreciate what you do. I can't imagine what my life would | |
be like without them. Of course things could be better but I think | |
my life is pretty good with these things in my world. | |
Ruby, Rails, MongoDB, MySQL, PostgreSQL, JavaScript, HTML, CSS, | |
Firefox, Safari, Chrome, Firebug, YSlow!, Page Speed, iPhone, iOS, | |
Mac OS X, iTunes, iPod, TextMate, Apache, Nginx, NodeJS, Git, jQuery, | |
Prototype, Processing, Growl, Quicksilver, Illustrator, Photoshop, | |
and Fireworks; |
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
class ThingsController < ApplicationController | |
# curl -c mycookies localhost:3000/things/new | |
# The "-c" flag will create/overwrite a cookie file named "mycookies" | |
def new | |
render :json => { :authenticity_token => form_authenticity_token } | |
end | |
# curl -i -b cookies -d "test=hey&authenticity_token=[URLEncoded auth token]" localhost:3000/things | |
# The "-i" flag returns the response header (optional) |
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
$ pgrep resque | xargs pargs -a | |
26760: /opt/local/ree/bin/ruby /opt/local/ree/bin/resque-pool --daemon --environment s | |
argv[0]: resque-1.15.0: Waiting for mailer | |
argv[1]: | |
argv[2]: | |
argv[3]: | |
argv[4]: | |
26975: /opt/local/ree/bin/ruby /opt/local/ree/bin/resque-pool --daemon --environment s |
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
<?xml version="1.0"?> | |
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> | |
<service_bundle type="manifest" name="resque-web"> | |
<service name="application/resque-web" type="service" version="1"> | |
<create_default_instance enabled="false" /> | |
<single_instance /> | |
<dependency name="network" grouping="require_all" restart_on="error" type="service"> | |
<service_fmri value="svc:/milestone/network:default" /> | |
</dependency> | |
<dependency name="filesystem" grouping="require_all" restart_on="error" type="service"> |
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
console.info('* TRUTH *'); | |
var truth = function() { return true; }; | |
console.info(truth); // function() | |
console.info(truth()); // true | |
console.info('* F *'); | |
var origF = function(arg) { return arg; }; | |
var f = origF; | |
console.info(f); // function() |
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 truth = function() { return true; }; | |
var relativeTruth = function() { return false; }; | |
var assert = function(func) { | |
return func() == true; | |
}; | |
var wrapper = function(func) { | |
// perform setup work here |
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
wpcf7_add_shortcode( 'text', 'wpcf7_text_shortcode_handler', true ); | |
wpcf7_add_shortcode( 'text*', 'wpcf7_text_shortcode_handler', true ); | |
wpcf7_add_shortcode( 'email', 'wpcf7_text_shortcode_handler', true ); | |
wpcf7_add_shortcode( 'email*', 'wpcf7_text_shortcode_handler', true ); |
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
wpcf7_add_shortcode( 'text', 'wpcf7_text_shortcode_handler', true ); | |
wpcf7_add_shortcode( 'text*', 'wpcf7_text_shortcode_handler', true ); | |
wpcf7_add_shortcode( 'email', 'wpcf7_text_shortcode_handler', true ); | |
wpcf7_add_shortcode( 'email*', 'wpcf7_text_shortcode_handler', true ); | |
wpcf7_add_shortcode( 'tel', 'wpcf7_text_shortcode_handler', true ); |
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
# Install any dependencies with pkgin | |
pkgin in gmake ruby18 readline ncurses gcc47 curl apr apr-util apache ap22-xsendfile postgresql91 | |
# Install REE | |
env CFLAGS="-I/opt/local/include -O2 -fno-tree-dce -fno-optimize-sibling-calls" ./ruby-enterprise/installer | |
# Test for segfault | |
gem update --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
<head> | |
<title>conditional templates</title> | |
</head> | |
<body> | |
Open the console. Session.set('active') to 'foo' or 'bar'. Then set the foo contents with Session.set('fooContents') to 'foofoo' and 'foobar'. Set bar contents with Session.set('barContents') to 'barfoo' or 'barbar', respectively. | |
{{> main }} | |
</body> |
OlderNewer