THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
| with table_stats as ( | |
| select psut.relname, | |
| psut.n_live_tup, | |
| 1.0 * psut.idx_scan / greatest(1, psut.seq_scan + psut.idx_scan) as index_use_ratio | |
| from pg_stat_user_tables psut | |
| order by psut.n_live_tup desc | |
| ), | |
| table_io as ( | |
| select psiut.relname, | |
| sum(psiut.heap_blks_read) as table_page_read, |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
| #!/bin/bash | |
| # git-cleanup-repo | |
| # | |
| # Author: Rob Miller <rob@bigfish.co.uk> | |
| # Adapted from the original by Yorick Sijsling | |
| git checkout master &> /dev/null | |
| # Make sure we're working with the most up-to-date version of master. | |
| git fetch |
I spent a lot of time trying to find a pretty optimal (for me) setup for Clojure… at the same time I was trying to dive in and learn it. This is never optimal; you shouldn't be fighting the environment while trying to learn something.
I feel like I went through a lot of pain searching Google, StackOverflow, blogs, and other sites for random tidbits of information and instructions.
This is a comprehensive "what I learned and what I ended up doing" that will hopefully be of use to others and act as a journal for myself if I ever have to do it again. I want to be very step-by-step and explain what's happening (and why) at each step.
| source "https://rubygems.org" | |
| gem 'sprockets' | |
| gem 'sprockets-sass' | |
| gem 'sass' | |
| gem 'compass' | |
| gem 'bootstrap-sass' | |
| gem 'handlebars_assets' | |
| gem 'coffee-script' |
| # This works with steak 0.3.x and rspec 1.x | |
| # For steak --pre and rspec 2 see this fork: http://gist.github.com/448487 | |
| # Put this code in acceptance_helper.rb or better in a new file spec/acceptance/support/javascript.rb | |
| Spec::Runner.configure do |config| | |
| config.before(:each) do | |
| Capybara.current_driver = :selenium if options[:js] | |
| end |
| module PaperclipMigrations | |
| def self.included(base) | |
| base.extend ClassMethods | |
| end | |
| module ClassMethods | |
| def add_paperclip_fields(table, prefix) | |
| add_column table, "#{prefix}_file_name", :string | |
| add_column table, "#{prefix}_content_type", :string |