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
| ALTER TABLE pgbench_accounts | |
| ADD created_on timestamptz, | |
| DROP CONSTRAINT pgbench_accounts_pkey; | |
| CREATE UNIQUE INDEX ON pgbench_accounts(aid, created_on DESC); |
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
| /** @jsx React.DOM */ | |
| define([ | |
| 'react', | |
| 'modernizr', | |
| 'punycode' | |
| ], function(React, Modernizr, punycode) { | |
| /** | |
| * Replaces the emojis in a text string with <img> tags |
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
| #!/bin/bash | |
| set -e | |
| export APP_NAME=$1 | |
| export PGHOST=$(< $HOME/predeploy.d/postgres_host) | |
| export PGUSER=admin | |
| if [ -f $HOME/$APP_NAME/DATABASE_URL ]; then | |
| # Database URL is already set - DB must exist | |
| DATABASE_URL=$(cat $HOME/$APP_NAME/DATABASE_URL) |
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
| my_chpwd() | |
| { | |
| if [[ -s "$PWD/set_env" ]] ; then | |
| source "$PWD/set_env" | |
| echo '(automatically sourced set_env)' | |
| fi |
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 Rails.env.production? | |
| PAYPAL_ACCOUNT = 'production@gmail.com' | |
| else | |
| PAYPAL_ACCOUNT = 'development@gmail.com' | |
| ActiveMerchant::Billing::Base.mode = :test | |
| end |
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
| #!/bin/bash | |
| APP_NAME="your-app-name-goes-here" | |
| APP_PATH=/home/deploy/${APP_NAME} | |
| # Production environment | |
| export RAILS_ENV="production" | |
| # This loads RVM into a shell session. Uncomment if you're using RVM system wide. | |
| # [[ -s "/usr/local/lib/rvm" ]] && . "/usr/local/lib/rvm" |
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 python | |
| import os | |
| import re | |
| import subprocess | |
| import sys | |
| modified = re.compile('^(?:M|A)(\s+)(?P<name>.*)') | |
| CHECKS = [ |
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
| include_recipe "postgresql::server90" | |
| # inspiration from | |
| # https://gist.github.com/637579 | |
| execute "create-root-user" do | |
| code = <<-EOH | |
| psql -U postgres -c "select * from pg_user where usename='root'" | grep -c root | |
| EOH | |
| command "createuser -U postgres -s root" |
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
| # | |
| # Cookbook Name:: atari | |
| # Recipe:: db_server | |
| # | |
| # Copyright 2010, Atari | |
| # | |
| # All rights reserved | |
| # | |
| include_recipe "postgresql::server" |
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> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta name="author" content="Martin Bean" /> | |
| <title>Twitter’s Bootstrap with Ryan Fait’s Sticky Footer</title> | |
| <link rel="stylesheet" href="css/bootstrap.min.css" /> | |
| <style> | |
| html, body { | |
| height: 100%; |
NewerOlder