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
@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 / 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: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"
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 / ftpquoatcheck.sh
Created May 6, 2013 22:55
Force Update of FTP Quotes in cPanel
/scripts/ftpquotacheck --force

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

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
# /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;
}
%ul.social-share
%li.text Share on:
%li
- summary = "#{@gallery.title} #{@gallery.gallery_type} #{@gallery.subtitle}"
- link = "http://www.facebook.com/sharer/sharer.php?s=100&p[url]=#{url_encode(request.url)}&p[images][0]=&p[title]=#{url_encode(@gallery.title)}&p[summary]=#{url_encode(summary)}"
= link_to link, target: "_blank" do
%i.icon-facebook
%li
- status = "#{@gallery.title} #{@gallery.gallery_type} #{@gallery.subtitle}"
- link = "http://twitter.com/home?status=#{url_encode(status)}"
@jaymiejones86
jaymiejones86 / setup.md
Last active January 17, 2018 18:21
My Average Rails App Setup

The Average Rails App Setup

Below outlines what is setup with my average rails app

Services

  • Digital Ocean/AWS Server/Heroku
  • AWS S3
  • Heroku Postgres
  • Skylight