Skip to content

Instantly share code, notes, and snippets.

View liuhui998's full-sized avatar

liuhui liuhui998

View GitHub Profile

Celery API

The Celery API is an ecommerce logic and storage engine designed to be an essential tool for any developer.

The API is currently in beta. Please contact help@trycelery.com if you intend to deploy our API in production code.

Our API is organized around REST and designed to have predictable, resource-oriented URLs, and to use HTTP response codes to indicate API errors. We support cross-origin resource sharing to allow you to interact securely with our API from a client-side web application (though you should remember that you should never expose your secret API key in any public website's client-side code). Although both JSON and XML are supported, JSON is the preferred method for API consumption. By default, JSON will be returned in all responses from the API and webhooks.

To view v1 API documentation, go to https://legacy.trycelery.com/developer.

/*
* A white-list based PAC without regexp, by @janlay
* It's just simple and fast.
* Last update: Dec 9, 2013
* Special thanks to @Paveo
*/
function FindProxyForURL(url, host) {
// REPLACE PROXY WITH YOUR OWN'S
var PROXY = "PROXY 127.0.0.1:8800;SOCKS 127.0.0.1:8801";
var DEFAULT = "DIRECT";
#!/bin/bash
### BEGIN INIT INFO
#
# Provides : resque-env
# Required-Start :
# Required-Stop :
# Default-Start : 2 3 4 5
# Default-Stop : 0 1 6
# Short-Description : Resque worker via init.d (assumes you have Ruby, and a plugin to allow wildcards in queue names)
# Description : see Short-Description, brah
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
make install
@liuhui998
liuhui998 / gist:2564282
Created May 1, 2012 01:39 — forked from xdite/gist:1273518
Octopress Wordpress converter
require 'rubygems'
require 'fileutils'
require 'date'
require 'yaml'
require 'rexml/document'
require 'ya2yaml'
include REXML