This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
#!C:\\Python25 | |
# -*- coding: GBK -*- | |
from Tkinter import * | |
import os | |
import tkFileDialog | |
import sys | |
import re | |
from tkMessageBox import * | |
import win32clipboard |
KEYWORDS="TODO:|FIXME:|\?\?\?:|\!\!\!:" | |
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | perl -p -e "s/($KEYWORDS)/ warning: \$1/" | |
//via http://deallocatedobjects.com/posts/show-todos-and-fixmes-as-warnings-in-xcode-4 |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
#import <mach/mach.h> | |
#import <mach/mach_host.h> | |
void print_free_memory () | |
{ | |
mach_port_t host_port; | |
mach_msg_type_number_t host_size; | |
vm_size_t pagesize; | |
host_port = mach_host_self(); |
#!/usr/bin/env node | |
var checkprime = function(smallerPrimes, number) { | |
isprime = 1; | |
for (var i = 0; i < smallerPrimes.length; i++) { | |
if (number % smallerPrimes[i] == 0) { | |
isprime = 0; | |
break; | |
} | |
} |
⌃ + a
Move to the beginning of the line.
⌃ + e
Move to the end of the line.
⌃ + u
Clear the entire line.
⌃ + w
Delete the word in front of the cursor.
⌃ + r
Search history.
⌥ + ⌘ + ]
Align Assignments#!/usr/bin/env ruby | |
unless ARGV[0] | |
puts 'Usage: newpost "the post title"' | |
exit(-1) | |
end | |
date_prefix = Time.now.strftime("%Y-%m-%d") | |
postname = ARGV[0].strip.downcase.gsub(/ /, '-') | |
post = "./_posts/#{date_prefix}-#{postname}.md" |