Skip to content

Instantly share code, notes, and snippets.

View brandon-beacher's full-sized avatar
💭
🦑

Brandon Beacher brandon-beacher

💭
🦑
View GitHub Profile
ActiveRecord::Base.connection.execute("CREATE OR REPLACE VIEW emails AS select gift_cards.id AS emailable_id, 'GiftCard' AS emailable_type, gift_cards.created_at AS created_at, gift_cards.updated_at AS updated_at, gift_cards.cart_id AS cart_id, gift_cards.amount AS amount, gift_cards.deliver_on AS deliver_on, gift_cards.delivered_at AS delivered_at, gift_cards.deliver_via_email AS deliver_via_email, gift_cards.recipient_email AS recipient_email from gift_cards where (gift_cards.deliver_via_email = true) union select notes.id AS emailable_id, 'Note' AS emailable_type, notes.created_at AS created_at, notes.updated_at AS updated_at, notes.cart_id AS cart_id, notes.amount AS amount, notes.deliver_on AS deliver_on, notes.delivered_at AS delivered_at, notes.deliver_via_email AS deliver_via_email, notes.recipient_email AS recipient_email from notes where (notes.deliver_via_email = true);")
Ext.define('BeltlineBikeShop.view.MainTabPanel', {
extend: 'Ext.TabPanel',
xtype: 'mainTabPanel',
config: {
items: [
{
title: 'Our Shop',
iconCls: 'home'
},
{
$ date
Wed Oct 19 21:04:30 EDT 2011
$ rails console
>> Date.yesterday
=> Wed, 19 Oct 2011
product = ChargifyProduct.find_or_initialize_by_product_id('29535')
product.update_attributes!(
:handle => "gold-level-partner-99",
:name => "Gold Partner (Monthly) $99",
:rate => "$99 every 30 days",
:production => true,
:setup_fee => "$0",
:data => { :gold => true, :offline => false } )
named_scope :contributors, {
:conditions => "exists (select person_id from people_roles where people_roles.person_id = people.id)" }
deploy@ip-10-122-227-218 / $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 9.9G 7.7G 1.7G 83% /
udev 10M 104K 9.9M 2% /dev
shm 3.8G 0 3.8G 0% /dev/shm
/dev/sdb 414G 327M 393G 1% /mnt
/dev/sdz1 20G 1.2G 18G 7% /data
/dev/sdz2 20G 1.6G 18G 9% /db
--type-add=ruby=.haml,.slim,.rake,.rsel,.builder,.prawn
--type-add=html=.html.erb,.html.haml,.html.slim
--type-add=js=.js,.js.erb,.coffee,.js.coffee
--type-add=css=.sass,.scss
--type-set=cucumber=.feature
--type-set=ejs=.ejs
--type-set=markdown=.markdown
--ignore-dir=log
--ignore-dir=rails
--ignore-dir=sencha-touch-1.1.0
--type-add=ruby=.haml,.slim,.rake,.rsel,.builder,.prawn
--type-add=html=.html.erb,.html.haml,.html.slim
--type-add=js=.js,.js.erb,.coffeescript
--type-add=css=.sass,.scss
--type-set=cucumber=.feature
--type-set=ejs=.ejs
--type-set=markdown=.markdown
--ignore-dir=log
--ignore-dir=rails
--ignore-dir=sencha-touch-1.1.0
20.times { Factory.create(:user) }
group :development, :test do
gem 'factory_girl_rails'
gem 'forgery'
end