Skip to content

Instantly share code, notes, and snippets.

View joshnabbott's full-sized avatar

Josh N. Abbott joshnabbott

  • Cloudflare Past:Area 1 Security, Big Cartel, Kajabi, Factory Design Labs, Oakley
  • Albuquerque, NM
View GitHub Profile
@HusseinMorsy
HusseinMorsy / overview.md
Last active July 22, 2019 17:25
The ultimate Rails/Ruby Version List

The ultimate list of Rails and Ruby versions

The list is based on the .travis.yml of each rails versions.

Rails latest min. Ruby max. Ruby
5.0.x master 2.2.2 2.2.2
4.2.x 4.2.1 1.9.3 2.2
4.1.x 4.1.10 1.9.3 2.2
4.0.x 4.0.13 1.9.3 2.2
56k: "https://123.campfirenow.com/images/56k.gif"
bell: ":bell:"
bezos: ":laughing::thought_balloon:"
bueller: "anyone?"
clowntown: "https://123.campfirenow.com/images/clowntown.gif"
cottoneyejoe: ":notes::hear_no_evil::notes:"
crickets: "hears crickets chirping"
dadgummit: "dad gummit!! :fishing_pole_and_fish:"
dangerzone: "https://123.campfirenow.com/images/dangerzone.png"
danielsan: ":fireworks: :trophy: :fireworks:"
@joshnabbott
joshnabbott / vim.rb
Created November 15, 2012 17:47
Homebrew vim formula that works on Lion
require 'formula'
class Vim < Formula
homepage 'http://www.vim.org/'
# Get stable versions from hg repo instead of downloading an increasing
# number of separate patches.
url 'https://vim.googlecode.com/hg/', :tag => 'v7-3-692'
version '7.3.692'
head 'https://vim.googlecode.com/hg/'
@joshnabbott
joshnabbott / gist:4035682
Created November 8, 2012 00:49 — forked from shripadk/gist:552554
Setting up Heroku Hostname SSL with GoDaddy SSL Cert
II. Creating a Certificate Signing Request (CSR)
Note: To create an SSL certificate, you must first generate and submit a Certificate Signing Request (CSR) to the Certification Authority (CA) (i.e. GoDaddy). The CSR contains your certificate-application information, including your public key. The CSR will also create your public/private key pair used for encrypting and decrypting secure transactions.
These instructions are based on my experience using a Mac OS X laptop. The following probably won't work if you are not working from a unix-based system (i.e. Mac OS X / Ubuntu Linux / etc.).
Steps to create a CSR:
1. Make a new directory to hold your project's SSL-related stuff. It doesn't really matter where you put this, but I recommend not putting it in your rails project (i.e. alongside app, config, db, etc.), as it will get included in your git repository if you do. Rather, I put it in a folder that is one level above my rails project.
# Some benchmarking I did on a local redis instance
# Tested using:
# Mac OSX Lion
# Ruby 1.9.3
# IRB
# Redis 2.4.8
# 10_000
>> r.info['used_memory_human']
@joshnabbott
joshnabbott / gist:1936170
Created February 28, 2012 23:33 — forked from stephenmckinney/gist:1932021
Installing Ruby 1.8.7 on Lion with only Command Line Tools for Xcode non-llvm gcc 4.2

Installing older Rubies (e.g. Ruby 1.8.7) on a clean install of Lion and Xcode

The latest Xcode and Command Line Tools for Xcode changes the default compiler from gcc to the llvm compiler. Only ruby-1.9.3-p125+ is LLVM ready. So, you will have to install gcc-4.2 to compile older versions of Ruby. More detail here https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers.

This worked for me. I hope it saves some people time:

brew install https://raw.github.com/adamv/homebrew-alt/master/duplicates/apple-gcc42.rb
CC=/usr/local/bin/gcc-4.2 rvm install 1.8.7
@macks
macks / restart-unicorn.rb
Created December 29, 2011 12:57
Graceful restart script for Unicorn
#!/usr/bin/ruby
# restart-unicorn: Graceful restart for Unicorn
# depends on Linux's proc(5)
#
# MIT License: Copyright(c)2011 MATSUYAMA Kengo
require 'scanf'
require 'timeout'
class ProcFS
@joshnabbott
joshnabbott / gist:1514978
Created December 23, 2011 18:16 — forked from bemurphy/gist:1424311
run ctags in a post-checkout hook
#!/usr/bin/env ruby
require "shellwords"
def run_tags
`ctags -R . 2>/dev/null`
end
def project_dir
File.basename Dir.pwd

New Machine

What I do after I do a fresh install. Things are sorta grouped by type.

General Config

  1. Start downloading Xcode
  2. Disable auto-bright and turn brightness all the way up
  3. Turn up trackpad tracking
  4. Disable trackpad pinch open & close