h1. Sublime Text 2 - Useful Shortcuts (Mac OS X)
h2. General
- ⌘T go to file
- ⌘⌃P go to project
- ⌘R go to methods
- ⌃G go to line
- ⌘KB toggle side bar
- ⌘⇧P command prompt
# ....other stuff here | |
paginate: 10 |
h1. Sublime Text 2 - Useful Shortcuts (Mac OS X)
h2. General
Hello there! This is a sample post for gist.io, a super-lightweight writing soapbox for hackers.
Now look up. Further. Above the post title. See that grey text with the gist ID?
Now back to me. That grey text is a link! Open that sucker in a new tab to see the source for this post. Also, I'm on a horse.
If you peek at it with a web inspector, you'll see that it is a second-level heading. You can use first level headings, but they'll look just like the second level ones, and the gods of the HTML5 outlining algorithm will frown upon you.
#!/usr/bin/env ruby | |
# Script to create a jekyll blog post using a template and open it in textmate. It takes one input parameter | |
# which is the title of the blog post | |
# e.g. command: | |
# $ ./new.rb "helper script to create new posts using jekyll" | |
# | |
# Author:Khaja Minhajuddin (http://minhajuddin.com) | |
# Minor tweaks by Claus Witt (http://www.clauswitt.com) |
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)
#!/bin/bash | |
# Schedule this to run once a day with cron. Doesn't matter what time since it parses yesterday's hits (by default). | |
# I only tested this on the Marco.org server, which runs CentOS (RHEL). No idea how it'll work on other distributions, but it's pretty basic. | |
# Required variables: | |
RSS_URI="/rss" | |
MAIL_TO="[email protected]" | |
LOG_FILE="/home/[UBERSPACE_USERNAME]/logs/access_log" |
#!/bin/bash | |
# Schedule this to run once a day with cron. Doesn't matter what time since it parses yesterday's hits (by default). | |
# I only tested this on the Marco.org server, which runs CentOS (RHEL). No idea how it'll work on other distributions, but it's pretty basic. | |
# Required variables: | |
RSS_URI="/rss" | |
MAIL_TO="[email protected]" | |
LOG_FILE="/home/[UBERSPACE_USERNAME]/logs/access_log" |
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.
});
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/> | |
<script src="http://cmx.io/v/0.1/cmx.js"></script> | |
<body> | |
<scene id="scene1"> | |
<label t="translate(0,346)"> | |
<tspan x="0" y="0em">Comix Sample</tspan> | |
</label> | |
<actor t="translate(131,49)" pose="-11,9|-5,117|-11,99|-11,89|-11,79|-11,59|-16,34|-21,9|-6,34|-1,9|-18,79|-18,59|-6,79|-1,59"> |