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
| /* | |
| jQuery.extend extracted from the jQuery source & optimised for NodeJS | |
| Twitter: @FGRibreau / fgribreau.com | |
| Usage: | |
| var Extend = require('./Extend'); | |
| // Extend | |
| var obj = Extend({opt1:true, opt2:true}, {opt1:false}); |
| module HttpAuthentication | |
| module Basic | |
| def authenticate_or_request_with_http_basic(realm = 'Application') | |
| authenticate_with_http_basic || request_http_basic_authentication(realm) | |
| end | |
| def authenticate_with_http_basic | |
| if auth_str = request.env['HTTP_AUTHORIZATION'] | |
| return 'login:password' == ActiveSupport::Base64.decode64(auth_str.sub(/^Basic\s+/, '')) | |
| end |
| These are some notes from troubleshooting common OpenStack Errors that I have run into in the past year. These were mostly from Diablo and Essex but some are applicable to future releases especially surrounding Nova. | |
| /*Check all services | |
| $nova-manage service list (check for XXX or smiley face) | |
| Binary Host Zone Status State Updated_At | |
| nova-scheduler openstack1 nova enabled : – ) 2012-05-12 22:42:14 | |
| nova-compute openstack1 nova enabled : – ) 2012-05-12 22:42:12 | |
| nova-network openstack1 nova enabled : – ) 2012-05-12 22:42:14 |
| OS=`echo \`uname\` | tr '[:upper:]' '[:lower:]'` | |
| AURL="https://gist.githubusercontent.com/hightemp/5071909/raw/" | |
| ANAME=".bash_aliases" | |
| TMPAPATH="/tmp/$ANAME" | |
| HOMEAPATH="~/$ANAME" | |
| [ "$OS" = "windowsnt" ] && OS_WIN="yes" | |
| [ "$OS" = "darwin" ] && OS_MAC="yes" | |
| [ "$OS" = "linux" ] && OS_LIN="yes" |
| /* | |
| * object.watch polyfill | |
| * | |
| * 2012-04-03 | |
| * | |
| * By Eli Grey, http://eligrey.com | |
| * Public Domain. | |
| * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
| */ |
#PHP Snippets
##Transliterate
<?php
function transliterate($text, $lowercase=true)
{
static $smap, $chars, $regex, $maps;###Dump data from sqlite
sqlite3 some.db .sch > schema
sqlite3 some.db .dump > dump
grep -v -f schema dump > data###Load data from file
cat data | sqlite3 database.db