Skip to content

Instantly share code, notes, and snippets.

@notch8-old
notch8-old / gist:987876
Created May 23, 2011 23:44
xulrunner_writer
#!/usr/bin/env ruby
main = Dir.glob('/usr/lib/xulrunner-1.9*').last
dev = Dir.glob('/usr/lib/xulrunner-devel-1.9*').last
File.open("/etc/ld.so.conf.d/xulrunner.conf", "w") do |file|
file.puts main
file.puts dev
end
---
javascripts:
- admin:
- zone
- taxonomy
- tabs
- spree
- slider-stuff
- product
- open_id
<script type='text/javascript'>
$(document).ready(function() {
$('#more-info-link').show();
$('#get-more-info').hide();
if (getParameterByName('window') == 'rfi') {
new Boxy($('#get-more-info'), {title: 'Request Information', modal: true});
} else {
$('#more-info-link').click(function() {
new Boxy($('#get-more-info'), {title: 'Request Information', modal: true});
return false;
ActiveRecord::StatementInvalid: PGError: ERROR: column "reviews.id" must appear in the GROUP BY clause or be used in an aggregate function
: SELECT "reviews".* FROM "reviews" INNER JOIN "product_associations" ON "reviews".product_association_id = "product_associations".id WHERE (("product_associations".product_id = 52)) GROUP BY user_id ORDER BY reviews.created_at DESC, reviews.id DESC
`echo 'depot-wares'`
`curl -X POST -d '{"source":"http://127.0.0.1:5984/depot-wares","target":"depot-wares", "continuous":true}' http://localhost:5985/_replicate`
`echo 'depot-orders'`
`curl -X POST -d '{"source":"http://127.0.0.1:5985/depot-orders","target":"depot-orders", "continuous":true}' http://localhost:5984/_replicate`
`echo 'depot-orders'`
`curl -X POST -d '{"source":"http://127.0.0.1:5984/depot-orders","target":"depot-orders", "continuous":true}' http://localhost:5985/_replicate`
`echo 'depot-notes'`
`curl -X POST -d '{"source":"http://127.0.0.1:5985/depot-notes","target":"depot-notes", "continuous":true}' http://localhost:5984/_replicate`
`echo 'depot-notes'`
`curl -X POST -d '{"source":"http://127.0.0.1:5984/depot-notes","target":"depot-notes", "continuous":true}' http://localhost:5985/_replicate`
# DEPOT
`echo 'depot-wares'`
`curl -X POST -d '{"source":"http://127.0.0.1:5984/depot-wares","target":"depot-wares", "continuous":true}' http://localhost:5985/_replicate`
`echo 'depot-orders'`
`curl -X POST -d '{"source":"http://127.0.0.1:5985/depot-orders","target":"depot-orders", "continuous":true}' http://localhost:5984/_replicate`
`echo 'depot-orders'`
`curl -X POST -d '{"source":"http://127.0.0.1:5984/depot-orders","target":"depot-orders", "continuous":true}' http://localhost:5985/_replicate`
`echo 'depot-notes'`
`curl -X POST -d '{"source":"http://127.0.0.1:5985/depot-notes","target":"depot-notes", "continuous":true}' http://localhost:5984/_replicate`
`echo 'depot-notes'`
#!/usr/bin/env ruby
if ARGV[0] == 'depot'
system("ssh -i .ssh/assaydepot-depot ubuntu@assaydepot.com")
else
system("ssh -i .ssh/assaydepot-#{ARGV[0]} ubuntu@#{ARGV[0]}.assaydepot.com")
end
class Site < Application
# GET /pages
def index
if session.user
render :welcome
else
@html_body = "front-page"
render :index
end
end
# An application template for Rails 3
gem "factory_girl_rails", :group => [:development, :test]
gem "factory_girl_generator", :group => [:development, :test]
gem "rspec", :group => [:development, :test]
gem "rspec-rails", :group => [:development, :test]
gem "haml"
gem "haml-rails"
gem "compass"
gem "taps"
gem "heroku", :group => :development
# Certain methods require authentication. To get your Twitter OAuth credentials,
# register an app at http://dev.twitter.com/apps
Twitter.configure do |config|
config.consumer_key = YOUR_CONSUMER_KEY
config.consumer_secret = YOUR_CONSUMER_SECRET
config.oauth_token = YOUR_OAUTH_TOKEN
config.oauth_token_secret = YOUR_OAUTH_TOKEN_SECRET
end
# Update your status