⌘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 hidden or 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
# All CoffeeScript examples from: https://github.com/jashkenas/coffee-script/blob/master/examples/computer_science/ | |
# All Java Script examples from: https://github.com/nzakas/computer-science-in-javascript - Copyright (c) 2009 Nicholas C. Zakas | |
# - Released under https://github.com/nzakas/computer-science-in-javascript/blob/master/LICENSE (*.js copyright headers reduced for clarity) | |
# Uses a binary search algorithm to locate a value in the specified array. | |
binary_search = (items, value) -> | |
start = 0 |
This file contains hidden or 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
module Vagrant | |
module Provisioners | |
class Sprinkle < Base | |
register :sprinkle | |
class Config < Vagrant::Config::Base | |
attr_accessor :cookbooks_path | |
end | |
def prepare |
This file contains hidden or 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
user logankoester logankoester; | |
worker_processes 2; | |
events { | |
worker_connections 2048; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; |
This file contains hidden or 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
# Pass in the name of the site you wich to create a cert for | |
domain_name = ARGV[0] | |
if domain_name == nil | |
puts "Y U No give me a domain name?" | |
else | |
system "openssl genrsa -out #{domain_name}.key 1024" | |
system "openssl req -new -key #{domain_name}.key -out #{domain_name}.csr -subj '/C=US/ST=NJ/L=Monroe/O=MyCompany/OU=IT/CN=#{domain_name}'" | |
system "cp #{domain_name}.key #{domain_name}.key.bak" |
This file contains hidden or 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
# These are my notes from the PragProg book on CoffeeScript of things that either | |
# aren't in the main CS language reference or I didn't pick them up there. I wrote | |
# them down before I forgot, and put it here for others but mainly as a reference for | |
# myself. | |
# assign arguments in constructor to properties of the same name: | |
class Thingie | |
constructor: (@name, @url) -> | |
# is the same as: |
This file contains hidden or 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 | |
require 'rubygems' | |
require 'base32' | |
require 'openssl' | |
int = 30 | |
now = Time.now.to_i / int | |
key = Base32.decode File.read('secret.key').strip |
This file contains hidden or 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
class window.TodoView extends Backbone.View | |
tagName: "li" | |
template: _.template($('#item-template').html()) | |
events: | |
"click .check" : "toggleDone" | |
"dblclick div.todo-content" : "edit" | |
"click span.todo-destroy" : "clear" | |
"keypress .todo-input" : "updateOnEnter" |
-
The new rake task assets:clean removes precompiled assets. [fxn]
-
Application and plugin generation run bundle install unless
--skip-gemfile
or--skip-bundle
. [fxn] -
Fixed database tasks for jdbc* adapters #jruby [Rashmi Yadav]
-
Template generation for jdbcpostgresql #jruby [Vishnu Atrai]
This file contains hidden or 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
>> load './RUNME-demo_of_async_fibers.rb' | |
/Users/flip/ics/backend/son_of_a_batch/RUNME-demo_of_async_fibers.rb:4: warning: already initialized constant FIBER_IDXS | |
814e5e90 0 f_0 beg main top level | |
814e5e90 1 f_0 beg em setup this block sets up the eventmachine execution, but no execution-order shenanigans yet | |
814e5e90 2 f_0 beg fiber stp the end-the-reactor block won't be called for 1.5s, so we get here immediately. | |
814e5e90 3 f_0 end fiber stp nothing from inside the Fiber.new{} block has run yet. | |
814e5e90 4 f_0 end fiber stp kick off the fiber... | |
80d829a0 5 f_1 beg fiber when my_fiber.resume is called, this runs. Now in a new fiber | |
80d829a0 6 f_1 beg get_result get_result is called from within fiber_1 | |
80d829a0 7 f_1 setup callback set up some code to run 1.5s from now |