This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Mongoid | |
| module Paranoia | |
| extend ActiveSupport::Concern | |
| module ClassMethods | |
| end | |
| module InstanceMethods | |
| # 'remove' method is soft-delete for Paranoia module which i read somewhere is extracted from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
| <title>Stripe Getting Started Form</title> | |
| <script type="text/javascript" src="https://js.stripe.com/v1/"></script> | |
| <!-- jQuery is used only for this example; it isn't required to use Stripe --> | |
| <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
| <script type="text/javascript"> | |
| // this identifies your website in the createToken call below |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # This is an RVM Project .rvmrc file, used to automatically load the ruby | |
| # development environment upon cd'ing into the directory | |
| # First we specify our desired <ruby>[@<gemset>], the @gemset name is optional. | |
| environment_id="ruby-1.9.2-p290@imetrics" | |
| # | |
| # Uncomment following line if you want options to be set only for given project. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user www-data; | |
| worker_processes 1; | |
| error_log /var/log/nginx.error.log; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copy paste line by line in your terminal. On the same window. | |
| # Do not copy paste the sentences with '#' in teh beginning | |
| heroku login | |
| git checkout master | |
| git merge dev | |
| git push origin master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="profile-<%= act.class.name.underscore.downcase.to_s.split('_').join('-') %>"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # standard capistrano config goes here.... | |
| # Put the maintenance screen if DB migrations take in place only | |
| before "deploy", "deploy:delayed_job:stop" | |
| before "deploy:migrations", "deploy:delayed_job:stop" | |
| after "deploy:update_code", "deploy:symlink_shared", "deploy:assets_compress" | |
| before "deploy:migrate", "deploy:web:disable", "deploy:db:backup" | |
| after "deploy", "newrelic:notice_deployment", "deploy:cleanup", "deploy:delayed_job:restart" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| If builds of PostgreSQL 9 are failing and you have version 8.x installed, | |
| you may need to remove the previous version first. See: | |
| https://github.com/mxcl/homebrew/issues/issue/2510 | |
| To build plpython against a specific Python, set PYTHON prior to brewing: | |
| PYTHON=/usr/local/bin/python brew install postgresql | |
| See: | |
| http://www.postgresql.org/docs/9.1/static/install-procedure.html | |
| # Create/Upgrade a Database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| kern.sysv.shmmax=33554432 | |
| kern.sysv.shmmin=1 | |
| kern.sysv.shmmni=256 | |
| kern.sysv.shmseg=64 | |
| kern.sysv.shmall=8192 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Start | |
| pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start | |
| # Stop | |
| pg_ctl -D /usr/local/var/postgres stop -s -m fast | |
| # Status | |
| pg_ctl -D /usr/local/var/postgres status |