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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
function displayTweets(data) { | |
$("#loading").remove(); | |
$.each(data.results, function(i, item) { | |
$("#tweets").append($("<li/>").text(item.text)); |
import base64 | |
import hashlib | |
import hmac | |
import simplejson as json | |
def base64_url_decode(inp): | |
padding_factor = (4 - len(inp) % 4) % 4 | |
inp += "="*padding_factor | |
return base64.b64decode(unicode(inp).translate(dict(zip(map(ord, u'-_'), u'+/')))) |
# | |
# Advanced Django 1.3.x+ Logging | |
# | |
# Author: | |
# Jason Giedymin < jasong _[_a-t_]_ apache d-o-t org > | |
# | |
# Description: | |
# A Django 1.3.x+ settings.py snippet with Advanced logging formatters using RFC 2822, | |
# TimedRotatingFileHandler, and a WatchedFileHandler. | |
# |
"""WSGI application file""" | |
import os | |
from django.core.wsgi import get_wsgi_application | |
from barrel import cooper | |
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project.settings') | |
django_app = get_wsgi_application() |
from django import forms | |
from django.core import validators | |
from django.core.exceptions import ValidationError | |
class MinLengthValidator(validators.MinLengthValidator): | |
message = 'Ensure this value has at least %(limit_value)d elements (it has %(show_value)d).' | |
class MaxLengthValidator(validators.MaxLengthValidator): | |
message = 'Ensure this value has at most %(limit_value)d elements (it has %(show_value)d).' |
#!/usr/bin/python | |
#################### | |
# ansiblecaller.py | |
#################### | |
import os | |
import sys | |
import subprocess | |
import shlex |
description "Jekyll node.js server" | |
author "Jon Hazan<jon@hazan.me>" | |
env USER=www-data | |
env SITENAME=yoursite.com | |
env SITEDIR=/var/www/yoursite.com/ | |
env JEKYLL=/usr/local/bin/jekyll | |
#Make sure mounting is completed before starting | |
start on started mountall |
redis: | |
image: redis | |
postgres: | |
image: postgres | |
environment: | |
- POSTGRES_PASSWORD=sentry | |
- POSTGRES_USER=sentry | |
volumes: | |
- /var/lib/postgresql/data |
create index on :Country(name); | |
create index on :City(name); | |
create index on :Sport(name); | |
create index on :Discipline(name); | |
create index on :Athlete(name); | |
create index on :Event(name); | |
create index on :Year(name); | |
create index on :Gender(name); | |
create constraint on (c:Country) assert c.noc is unique; |