Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/
./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent
NOTE: You will need at least Redis 2.1.6 to use the ZREVRANGEBYSCORE method. | |
Add players to HIGHSCORES table: | |
fossil:~ dczarnecki$ redis-cli | |
redis> zadd HIGHSCORES 1 player_1 | |
(integer) 1 | |
redis> zadd HIGHSCORES 2 player_2 | |
(integer) 1 | |
redis> zadd HIGHSCORES 3 player_3 |
doctrine: | |
dbal: | |
driver: pdo_sqlite | |
path: :memory: | |
memory: true | |
orm: | |
auto_generate_proxy_classes: true | |
auto_mapping: true |
#!/usr/bin/perl -w | |
# | |
# splitmysqldump - split mysqldump file into per-database dump files. | |
use strict; | |
use warnings; | |
my $dbfile; | |
my $dbname = q{}; | |
my $header = q{}; | |
while (<>) { |
/* This WAS a two-line function until an awesome reddit user pointed out my logical flaw. Now It's a 5-line function :( */ | |
var Class = function(d){ | |
d.constructor.extend = function(def){ | |
for (var k in d) if (!def.hasOwnProperty(k)) def[k] = d[k]; | |
return Class(def); | |
}; | |
return (d.constructor.prototype = d).constructor; | |
}; |
function type(obj) { | |
var obj_type = typeof obj; | |
return({ is : function(type) { return obj_type === type; }, | |
is_object : function() { return obj_type === "object"; }, | |
is_func : function() { return obj_type === "function"; }, | |
is_string : function() { return obj_type === "string"; }}); | |
}; | |
function maybe(item) { |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
# Don't include any temporary files and other unimportant things | |
*.log | |
*.bak | |
*.bak.* | |
*.thumbs/ | |
.DS_Store | |
Thumbs.db | |
.svn | |
*.swp |
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.
[alias] | |
fixup = !sh -c 'REV=$(git rev-parse $1) && git commit --fixup $@ && git rebase -i --autosquash $REV^' - | |
squash = !sh -c 'REV=$(git rev-parse $1) && git commit --squash $@ && git rebase -i --autosquash $REV^' - |