⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run this file with `RAILS_ENV=production rackup -p 3000 -s thin` | |
# Be sure to have rails and thin installed. | |
require "rubygems" | |
# We are not loading Active Record, nor the Assets Pipeline, etc. | |
# This could also be in your Gemfile. | |
gem "actionpack", "~> 3.2" | |
gem "railties", "~> 3.2" | |
# The following lines should come as no surprise. Except by |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# giftube – Generates an animated gif from a YouTube url. | |
# | |
# Usage: | |
# | |
# giftube [youtube url] [minute:second] [duration] | |
# | |
# ex. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2139 ℹ INFORMATION SOURCE | |
23EB ⏫ BLACK UP-POINTING DOUBLE TRIANGLE | |
23EC ⏬ BLACK DOWN-POINTING DOUBLE TRIANGLE | |
23F0 ⏰ ALARM CLOCK | |
23F3 ⏳ HOURGLASS WITH FLOWING SAND | |
26C5 ⛅ SUN BEHIND CLOUD | |
26D4 ⛔ NO ENTRY | |
2705 ✅ WHITE HEAVY CHECK MARK | |
2753 ❓ BLACK QUESTION MARK ORNAMENT | |
2757 ❗ HEAVY EXCLAMATION MARK SYMBOL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime, sublime_plugin | |
import os, string, re | |
class DetectFileTypeCommand(sublime_plugin.EventListener): | |
""" Attempts to choose the correct syntax when more than one could apply. """ | |
def __init__(self): | |
super(DetectFileTypeCommand, self).__init__() | |
self.path = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
services=(iTunes Rdio Spotify) | |
for service in "${services[@]}"; do | |
if ps axco pid,command | grep -v grep | egrep "$service\$" > /dev/null; then | |
state=`osascript -e "tell application \"$service\" to get player state as string"` | |
if [ "$state" = "playing" ] ; then | |
artist_name=`osascript -e"tell application \"$service\" to get artist of current track"` | |
song_title=`osascript -e"tell application \"$service\" to get name of current track"` | |
artist=`echo $artist_name | sed "s/[[:space:]]/%20/g"` |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/array.c b/array.c | |
index 64647c3..618d9e3 100644 | |
--- a/array.c | |
+++ b/array.c | |
@@ -255,15 +255,24 @@ rb_ary_modify(VALUE ary) | |
rb_ary_modify_check(ary); | |
if (ARY_SHARED_P(ary)) { | |
long len = RARRAY_LEN(ary); | |
+ VALUE shared = ARY_SHARED(ary); | |
if (len <= RARRAY_EMBED_LEN_MAX) { |
NOTE: THIS PATCH DOES NOT APPLY. Falcon's performance patches have not been updated for p362. See the comments for a fork that uses the Rails Express patch set instead.
This installs a patched ruby 1.9.3-p362 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
if ! which md5sum > /dev/null; then | |
echo Install md5sum | |
exit 1 | |
fi | |
if ! which curl > /dev/null; then | |
echo Install curl | |
exit 1 |
OlderNewer