Skip to content

Instantly share code, notes, and snippets.

View jaymiejones86's full-sized avatar
🏠
Working from home

Jaymie Jones jaymiejones86

🏠
Working from home
View GitHub Profile
# /etc/nginx/sites-enabled/berlin
upstream spree.ryanbigg.com {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response (in case the Unicorn master nukes a
# single worker for timing out).
# for UNIX domain socket setups:
server unix:/tmp/berlin.socket fail_timeout=0;
}
require 'spec_helper'
feature 'import xls spreadsheet of members' do
scenario 'importing members from spreadsheet' do
pending
end
scenario 'importing members from spreadsheet with errors' do
pending

https://github.com/thoughtbot/laptop | thoughtbot/laptop https://github.com/thoughtbot/dotfiles | thoughtbot/dotfiles https://github.com/jetrockets/attrio | jetrockets/attrio https://www.solanolabs.com/product | Solano Labs | Product http://robots.thoughtbot.com/post/56828751507/how-to-create-postgres-indexes-concurrently-in | How to Create Postgres Indexes Concurrently in ActiveRecord Migrations http://robots.thoughtbot.com/post/55689359336/the-perils-of-uniqueness-validations | The Perils of Uniqueness Validations https://github.com/trptcolin/consistency_fail | trptcolin/consistency_fail http://dansowter.com/mailman-guide/ | dansowter.com | Mailman Guide https://discussions.apple.com/thread/4932384?start=0&tstart=0 | Quicktime Screen Recording Makes Green...: Apple Support Communities http://www.timseverien.nl/promin/ | Promin - sexy forms

@jaymiejones86
jaymiejones86 / ftpquoatcheck.sh
Created May 6, 2013 22:55
Force Update of FTP Quotes in cPanel
/scripts/ftpquotacheck --force
module Api
module V1
class DealsController < ApplicationController
respond_to :json
allow_oauth!
before_filter :authenticate_user!
load_and_authorize_resource
def index
respond_with Deal.all
@jaymiejones86
jaymiejones86 / gist:4257325
Created December 11, 2012 09:35
Processed Response, 200, 401, 200, 401
Started GET "/api/deals/7589" for 127.0.0.1 at 2012-12-11 20:33:13 +1100
Processing by Api::V1::DealsController#show as JSON
Parameters: {"id"=>"7589"}
User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."account_id" = 6 AND "users"."id" = 8 LIMIT 1
Opro::Oauth::AuthGrant Load (0.3ms) SELECT "opro_auth_grants".* FROM "opro_auth_grants" WHERE "opro_auth_grants"."access_token" = '25ab40012c839451914aa69eef3c077a' LIMIT 1
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."account_id" = 6 AND "users"."id" IN (8)
Opro::Oauth::ClientApp Load (0.2ms) SELECT "opro_client_apps".* FROM "opro_client_apps" WHERE "opro_client_apps"."id" IN (1)
Account Load (0.2ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 6]]
CACHE (0.0ms) SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = $1 LIMIT 1 [["id", 6]]
AppNotice Load (0.2ms) SELECT "app_notices".* FROM "app_notices"
@jaymiejones86
jaymiejones86 / App Second Request 200 - OK
Created December 11, 2012 09:32
App First Request 401 Unauthorised
GET http://subdomain.exampleapp.dev/api/deals/7589
Header Authorization token xyz123
Headers
Cache-Control: max-age=0, private, must-revalidate
Connection: Keep-Alive
Content-Type: application/json; charset=utf-8
Date: Tue, 11 Dec 2012 09:28:01 GMT
Etag: "b6b44c59b785dcbc6349fe31129f00b0"
@jaymiejones86
jaymiejones86 / gist:3956180
Created October 25, 2012 23:42
Postgres Dump and Export
# Dump
pg_dump -U username -W -h localhost dbname -f dump.sql
# Import
psql -U username -h localhost dbname -f /home/username/dump.sql
@jaymiejones86
jaymiejones86 / gist:3868169
Created October 10, 2012 20:21
Fix Drush PDO issue on Mac OSX
sudo mkdir /var/mysql
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
@jaymiejones86
jaymiejones86 / gist:3745981
Created September 18, 2012 21:20
Running Pow And MAMP Pro Together

Uninstall Pow if installed already

curl get.pow.cx/uninstall.sh | sh

Change pow's firewall to redirect all traffic from port 88 instead of port 80 (standard port)

echo 'export POW_DST_PORT=88' >> ~/.powconfig