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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
AuthType Basic | |
AuthName "Auth Required" | |
AuthUserFile /path/to/.htpasswd | |
Require valid-user | |
# allow public access to the following resources | |
SetEnvIf Request_URI "(path/to/directory/)$" allow | |
SetEnvIf Request_URI "(path/to/file\.phpt)$" allow | |
SetEnvIf Request_URI "(util)$" allow | |
Order allow,deny | |
Allow from env=allow |
find . -type f -mtime -5 -print | xargs ls -l |
Django==1.3.1 | |
django-celery==2.3.3 | |
redis==2.4.9 | |
celerymon |
from redis import Redis | |
import simplejson | |
class Resque(object): | |
"""Dirt simple Resque client in Python. Can be used to create jobs.""" | |
redis_server = 'localhost:6379' | |
def __init__(self): | |
host, port = self.redis_server.split(':') | |
self.redis = Redis(host=host, port=int(port)) |
#!/bin/sh | |
PATH=/sbin:/bin:/usr/sbin:/usr/bin | |
FCGIHOST="127.0.0.1" | |
FCGIPORT="5000" | |
RUNAS="projectuser:projectgroup" | |
UMASK="200" | |
DAEMON="/path/to/django/manage.py" | |
NAME="MyProject" |
# one-liner for generating this: mysqldump --no-data -uroot magento1600 | nawk '{if(match($0, /CREATE TABLE `(.*)`/, matchesT)) { the_table = matchesT[1]; } if(match($0, /(CONSTRAINT .*),?/, matchesK) && the_table) { the_key = gensub(/,?$/, "", matchesK[1]); the_key = gensub(/^ */, "", the_key); print "ALTER TABLE `" the_table "` ADD", the_key ";"; }}' | |
ALTER TABLE `admin_rule` ADD CONSTRAINT `FK_ADMIN_RULE_ROLE_ID_ADMIN_ROLE_ROLE_ID` FOREIGN KEY (`role_id`) REFERENCES `admin_role` (`role_id`) ON DELETE CASCADE ON UPDATE CASCADE; | |
ALTER TABLE `api_rule` ADD CONSTRAINT `FK_API_RULE_ROLE_ID_API_ROLE_ROLE_ID` FOREIGN KEY (`role_id`) REFERENCES `api_role` (`role_id`) ON DELETE CASCADE ON UPDATE CASCADE; | |
ALTER TABLE `api_session` ADD CONSTRAINT `FK_API_SESSION_USER_ID_API_USER_USER_ID` FOREIGN KEY (`user_id`) REFERENCES `api_user` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE; | |
ALTER TABLE `catalog_category_entity_datetime` ADD CONSTRAINT `FK_CAT_CTGR_ENTT_DTIME_ATTR_ID_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id |
require 'etc' | |
require 'fileutils' | |
# Copies the most recent MAX_IMAGES photos/videos from the device image dir. | |
# I use Dropbox to sync my device images to my workstation disk | |
MAX_IMAGES=500 | |
USER_HOME_DIR = Etc::getpwuid.dir | |
DEVICE_IMAGES_DIR="#{USER_HOME_DIR}/Dropbox/Camera Uploads" | |
SIMULATOR_IMAGES_DIR="#{USER_HOME_DIR}/Library/Application Support/iPhone Simulator/5.1/Media/DCIM/100APPLE" |
<?php | |
/** | |
* Copyright Magento 2012 | |
* Example of products list retrieve using Customer account via Magento | |
REST API. OAuth authorization is used | |
*/ | |
$callbackUrl = "http://yourhost/oauth_customer.php"; | |
$temporaryCredentialsRequestUrl = | |
"http://magentohost/oauth/initiate?oauth_callback=" . | |
urlencode($callbackUrl); |