Skip to content

Instantly share code, notes, and snippets.

@kirley
kirley / squash.md
Created November 11, 2016 15:23 — forked from annaguidi/squash.md
Phil's squash recipe

Step 1. Rebase

Before you run the command below, make sure you are in the right branch and have committed and pushed your most recent changes.

First, get the most recent version of master:

git fetch origin
@kirley
kirley / wicked-ember.txt
Created June 24, 2016 23:56
Ember Workshop Setup
Stuff to Download/Install
Install nvm
nvm lets you toggle between different versions of node.js easily. Installation is pretty simple, but is slightly different for Mac vs. Windows. Follow instructions here
Once you’re done, you can install versions of node quite easily
nvm install 5
nvm install 6
@kirley
kirley / Mac Updates Hang
Created July 13, 2015 16:24
Mac Updates Hang when using zsh
Mac App Store updates hang for mac programs like iMovie when system shell is set to zsh.
1. Force quite any hung installs (Activity Monitor > Force Kill)
2. Switch terminal shell to bash
> chsh -s /bin/bash
3. Re-run the install from Mac App Strore
4. Switch terminal back to zsh
> chsh -s /bin/zsh
@kirley
kirley / gist:21096406c784b2ff23ef
Last active August 29, 2015 14:12
Yosemite Development Setup

Yosemite Install

New Computer with OSX Yosemite.

Install Command Line Tools

xcode-select --install
@kirley
kirley / Convert Salesforce Id
Created December 21, 2014 05:01
Convert 15 digit Salesforce ID to 18 digit Salesforce ID
# convert 15 digit SFDC ID to 18 digit
def convert_salesforce_id(id)
if id.try(:length) == 15
chunks = id.chars.to_a
char_map = %w{A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5}
extension = []
chunks.each_slice(5) { |x| y = x.reverse.map {|c| (c.match /[A-Z]/) ? 1 : 0 }.join("").to_i(2) ; extension << y}
id = id + (extension.map {|e| char_map.at(e)}).join("").to_s
end
id
@kirley
kirley / gist:4178480
Created November 30, 2012 20:48
Delayed Job Notes
$ cd ~/work/Helios
$ rake jobs:work
or
$ foreman start
Then from within console
$ rails c
>>> Delayed::Job.first
@kirley
kirley / gist:3935949
Created October 23, 2012 00:47
Hosting Research
Architecture
- 4 Wordpress Sites with unique domain names, same theme but different css and content
- 1 Rails app - Need Postgis
Considerations
- SSL (only needed for rails app)
- 50+ domain names (currently apache virtualHost with ServerAlias "domain1.com", "domain2.com")
- Email?
- Session (how to track which site, which trip params they choose)
- Load balancing
@kirley
kirley / gist:3913166
Last active January 11, 2023 08:04
Setting up PostGIS for Timezone Lookup