Skip to content

Instantly share code, notes, and snippets.

View peteonrails's full-sized avatar

Peter Jackson peteonrails

View GitHub Profile
@peteonrails
peteonrails / README.md
Created January 4, 2019 14:40 — forked from jondkinney/README.md
jondkinney's console vim setup

Console VIM and Tmux setup compatible with Mac OS X and Linux.

Installation

Install by running the following command in your terminal:

exec 3<&1;bash <&3 <(curl https://gist.githubusercontent.com/jondkinney/2040114/raw/vim.sh 2> /dev/null)

[ ] Put signed contact in Dropbox [ ] Create Freshbooks invoice for first 2 weeks [ ] Create Freshbooks recurring invoice to start after week 3 (weekly) [ ] Create Campfire room [ ] Create Github Repo [ ] Create Trello Board (for Product Design Sprints or Rails MVPs, use Trello template) [ ] Create recurring calendar invites for weekly planning, retros, and daily standups [ ] Create project in Team [ ] Share Team project page with client [ ] Schedule thirty minute meeting with client to go over systems

# inspired by http://ariejan.net/2010/08/23/resque-how-to-requeue-failed-jobs
# retry all failed Resque jobs except the ones that have already been retried
# This is, for instance, useful if you have already retried some jobs via the web interface.
Resque::Failure.count.times do |i|
Resque::Failure.requeue(i) unless Resque::Failure.all(i, 1)['retried_at'].present?
end
# retry all :)
Resque::Failure.count.times do |i|
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@peteonrails
peteonrails / v1
Created March 13, 2012 17:48 — forked from adambair/v1
-------------------------------------------------------------
iIIIIIIIIIIIIIIi,
II 'IIi. Intridea, Inc
II 'Ii www.intridea.com
II iii II
II 'ii II Document Title Here
II II 12/05/2011 - 12/06/2011
II iii II
II. iii .II Adam Bair, Partner
@peteonrails
peteonrails / QGIS cmake in homebrew
Created January 31, 2012 18:33 — forked from cspanring/QGIS cmake in homebrew
homebrew formula cmake arguments and output for QGIS.
cmake -DCMAKE_INSTALL_PREFIX=~/Applications -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_TYPE=MinSizeRel -DWITH_INTERNAL_SPATIALITE=TRUE -DGEOS_INCLUDE_DIR=/usr/local/Cellar/geos/3.2.2/include -DGEOS_LIBRARY=/usr/local/Cellar/geos/3.2.2/lib/libgeos_c.dylib -DGDAL_INCLUDE_DIR=/usr/local/Cellar/gdal/1.7.3/include -DGDAL_LIBRARY=/usr/local/Cellar/gdal/1.7.3/lib/libgdal.dylib -DPYTHON_EXECUTABLE=/usr/local/Cellar/python/2.7.1/bin/python -DSIP_BINARY_PATH=/usr/local/bin/sip -DSIP_INCLUDE_DIR=/usr/local/include -DSIP_FOUND=true -DQWT_INCLUDE_DIR=/usr/local/Cellar/qwt/6.0.1/lib/qwt.framework/Versions/Current/Headers
-- Quantum GIS version: 1.9.90 Alpha (10990)
-- Could not find GRASS
-- Found Iconv: /usr/lib/libiconv.dylib
-- Found Proj: /usr/local/lib/libproj.dylib
-- Found GEOS: /usr/local/Cellar/geos/3.2.2/lib/libgeos_c.dylib
-- Found GDAL: /usr/local/Cellar/gdal/1.7.3/lib/libgdal.dylib
-- Found Expat: /usr/lib/libexpat.dylib
-- Found Qwt: /usr/local/lib/qwt.framework (6.0.1)
-- Found PostgreSQL: /usr/local/Cellar/po
#----------------------------------------------------------------------------
# Git Setup
#----------------------------------------------------------------------------
file '.gitignore', <<-FILE
.DS_Store
log/*.log
tmp/**/*
config/database.yml
db/*.sqlite3
public/uploads/*
=== Epic Snow Leopard Upgrayyyyd Guide ===
Son, you’re now living in the land of 64-bit systems.
That means that some of your 32-bit shit is now broken.
Not all is lost.
== Fixing MySQL weirdness
def tally(options = {})
find(:all, options_for_tally(options.merge({:order =>"count DESC" })))
end