Skip to content

Instantly share code, notes, and snippets.

View resistorsoftware's full-sized avatar

David Lazar resistorsoftware

View GitHub Profile
require 'toto'
require 'config/environment'
#point to your rails apps /public directory
use Rack::Static, :urls => ['/stylesheets', '/javascripts', '/images', '/favicon.ico'], :root => 'public'
use Rack::ShowExceptions
use Rack::CommonLogger
//Recommended Blueprint configuration with scoping and semantic layout:
+blueprint-utilities
+blueprint-debug
+blueprint-typography
//+blueprint-scaffolding
+sticky-footer(20px, "#container", "#root_footer", "#footer" )
body#site
#container
+container
%body#site
#container
#header
%h1 Foobar
#loading= image_tag("ajax-loader.gif")
#sidebar  
#content= yield
#root_footer
#footer © 2010 Foobar O-Rama
set :application, "foo"
set :repository, "git@github.com:foo/foobar.git"
set :scm, :git
role :web, "dev.foo.com" # Your HTTP server, Apache/etc
role :app, "dev.foo.com" # This may be the same as your `Web` server
role :db, "dev.foo.com", :primary => true # This is where Rails migrations will run
cap deploy:update
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
executing locally: "git ls-remote git@github.com:foo/foobar.git HEAD"
* executing "git clone -q git@github.com:foo/foobar.git dev/releases/20100527171357 && cd dev/releases/20100527171357 && git checkout -q -b deploy 6aa26ee969e86d6a7d7009e0d32b433de046b7d1 && (echo 6aa26ee969e86d6a7d7009e0d32b433de046b7d1 > dev/releases/20100527171357/REVISION)"
servers: ["dev.foo.com"]
[dev.foo.com] executing command
** [dev.foo.com :: err] sh: dev/releases/20100527171357/REVISION: No such file or directory
command finished
@resistorsoftware
resistorsoftware / coupons
Created July 17, 2010 15:38
Discount Coupons
require 'rubygems'
require 'mechanize'
BASE = 'http://manure.myshopify.com/admin'
LOGIN = '/auth/login'
USER = 'paddy@cow.com'
PWD = 'moo-moo'
agent = Mechanize.new
page = agent.get(BASE+LOGIN)
form = page.forms.first
form.login = USER
development:
adapter: postgresql
database: urbanaut_dev
username: uta
password: foo
test:
adapter: postgresql
database: urbanaut_test
username: uta
// ---------------------------------------------------------
// POST to cart/update.js returns the cart in JSON.
// To clear a particular attribute, set its value to an empty string.
// Receives attributes as a hash or array. Look at comments below.
// ---------------------------------------------------------
Shopify.updateCartAttributes = function(data, callback) {
var params = {
type: 'POST',
url: '/cart/update.js',
data: data,
SHELL = /bin/sh
#### Start of system configuration section. ####
srcdir = .
topdir = /usr/lib/ruby/1.8/x86_64-linux
hdrdir = $(topdir)
VPATH = $(srcdir):$(topdir):$(hdrdir)
exec_prefix = $(prefix)
prefix = $(DESTDIR)/usr
[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1