Skip to content

Instantly share code, notes, and snippets.

@brentertz
brentertz / rvm2rbenv.txt
Created November 21, 2011 23:00
Switch from RVM to RBENV
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################
@burke
burke / 0-readme.md
Created January 27, 2012 13:44 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@ttscoff
ttscoff / gitlogger.rb
Last active December 26, 2021 16:22
Archive marked git repositories daily commits to Day One and/or text file. Improved by @DivineDominion
#!/usr/bin/env ruby
require 'time'
require 'erb'
require 'cgi'
filename = "~/.gitlogger"
## File format, One per line
# Repo Name:/path/to/base
dayone = false # log to day one? (true or false)
textlog = false # "~/Dropbox/nvALT2.2/GitLogger.md" # set to false to disable
@javan
javan / screenshot.js
Created June 19, 2012 21:40
Create a screenshot of any URL using phantomjs (headless webkit)
//
// Example usage: phantomjs screenshot.js http://yahoo.com /tmp/yahoo.png
//
var system = require('system');
var url = system.args[1];
var filename = system.args[2];
var page = new WebPage();
page.open(url, function (status) {
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active July 26, 2024 10:00
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
#! /usr/bin/ruby
# Pre-commit hook for removing trailing whitespace, converting tabs to
# spaces and removing blank lines at the end of a file.
#
# Author: Clifton King <cliftonk@gmail.com>
# gist: https://gist.github.com/3173611
if File.exists? '.git/merge-rebase'
puts "Detected '.git/merge-rebase'! Skipping pre-commit hook..."
@tjluoma
tjluoma / skitch-edits.html
Created September 21, 2012 13:10
Skitch 1.0.7 and preventing the Mac App Store from prompting you to upgrade to 2.0
<h1>
Stop the App Store upgrade prompt</h1>
<p>
Fortunately I saved my copy of Skitch (version 1.0.12) after hearing <a href="http://twitter.com/danielpunkass">Daniel Jalkut</a> (developer at <a href="http://www.red-sweater.com/">Red Sweater Software</a> best known for <a href="http://www.red-sweater.com/marsedit/">MarsEdit</a> and <a href="http://www.red-sweater.com/fastscripts/">FastScripts</a>) mention that a brief stint with Skitch 2.0 had sent him back to Skitch version 1.</p>
<p>
The only problem is that the Mac App Store app kept telling me that Skitch needs to be updated. I even went into my Purchases list and '&quot;hid&quot; Skitch, but still the App Store kept telling me that it wanted to update Skitch.</p>
<p>
I seem to have found a solution, which was to quit Skitch.app, and then locate the app in /Applications/ using the Finder. Once there, I control-clicked on the app and chose &quot;Show Package Contents&quot;:</p>
<p style="text-align:center">
<img alt="" border="0" height="143" src="htt
@burtlo
burtlo / private.xml
Created September 26, 2012 13:30
TMUX: Rebinding CAPS LOCK to CTRL + B
<?xml version="1.0"?>
<root>
<appdef>
<appname>Terminal</appname>
<equal>com.apple.Terminal</equal>
</appdef>
<item>
<name>TMUX Key Remappings</name>
<item>
<name>TMUX: Right Control to Ctrl+B</name>
@mbinna
mbinna / podforceupdate.sh
Created December 4, 2012 09:43
Clear CocoaPods cache, re-download and re-install all pods
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
export RUBY_HEAP_MIN_SLOTS=600000
export RUBY_GC_MALLOC_LIMIT=59000000
export RUBY_HEAP_FREE_MIN=100000