Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #import <Carbon/Carbon.h> | |
| #import <dlfcn.h> | |
| /* | |
| * Returns an array of CFDictionaryRef types, each of which contains information about one of the processes. | |
| * The processes are ordered in front to back, i.e. in the same order they appear when typing command + tab, from left to right. | |
| * See the ProcessInformationCopyDictionary function documentation for the keys used in the dictionaries. | |
| * If something goes wrong, then this function returns NULL. | |
| */ | |
| CFArrayRef CopyLaunchedApplicationsInFrontToBackOrder(void) | 
| # | |
| # Initialize the stuff | |
| # | |
| # We build the status bar item menu | |
| def setupMenu | |
| menu = NSMenu.new | |
| menu.initWithTitle 'FooApp' | |
| mi = NSMenuItem.new | |
| mi.title = 'Hellow from MacRuby!' | |
| mi.action = 'sayHello:' | 
| Gemfile.lock merge=bundlelock | |
| db/schema.rb merge=railsschema | 
| module InterruptibleSleep | |
| def interruptible_sleep(seconds) | |
| @_sleep_check, @_sleep_interrupt = IO.pipe | |
| IO.select([@_sleep_check], nil, nil, seconds) | |
| end | |
| def interrupt_sleep | |
| @_sleep_interrupt.close if @_sleep_interrupt | |
| end | |
| end | 
| [teamcity] | |
| remote = <your remote repository url> | 
| These are my notes from my hands-on talk entitled "I went to Ben H's Git Workshop and all I got was this stupid Knowledge" | |
| Lots of people asked me to tweet them, even thought they are just a mix of notes-to-self, things to say, and things to type. | |
| Enjoy FWIF | |
| BEFORE ANYTHING, CLONE RAILS AND CREATE A COMMIT | |
| So, all git info is kept in the .git folder in the root folder of the repo | 
| $stack, $draws = [], {} | |
| def method_missing *args | |
| return if args[0][/^to_/] | |
| $stack << args.map { |a| a or $stack.pop } | |
| $draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :< | |
| end | |
| class Array | |
| def +@ | 
| " Next and Last {{{ | |
| " Motion for "next/last object". "Last" here means "previous", not "final". | |
| " Unfortunately the "p" motion was already taken for paragraphs. | |
| " | |
| " Next acts on the next object of the given type in the current line, last acts | |
| " on the previous object of the given type in the current line. | |
| " | |
| " Currently only works for (, [, {, b, r, B, ', and ". | |
| " | 
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #!/usr/bin/env ruby | |
| gem "parser", "~> 1.4" | |
| require "parser" | |
| require "parser/ruby19" | |
| require "set" | |
| class ConstantDeclarationAndUseProcessor < Parser::AST::Processor | |
| attr_reader :declared, :used | |
| def initialize |