⌘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
class TaxCode | |
GENERATORS = { | |
:us => lambda { |id| "US-#{id}" }, | |
:br => lambda { |id| "#{id + 9}-BRA" } | |
} | |
def self.generate(code, id) | |
gen = GENERATORS[code] || (raise ArgumentError "No generator for country #{code}") | |
gen.call(id) | |
end |
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 | |
# Filename catc | |
# Description print files to stdout with syntax highlighting (using python-pygments) | |
# Author Drew Fradette <http://www.github.com/drewfradette> | |
# Version 0.6 | |
# Last Updated 2012-09-26 | |
# Usage catc file.sh | |
# bash_version 4.2.10(1)-release | |
####################################################### |
Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.
Create a Meteor app and put the client_/server_ files in a client/server directories. Also, create a public dir to save the uploaded files.
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
// Ported to Rust 0.13.0-nightly but it doesn't seem to work as expected | |
use std::time::duration::Duration; | |
use std::sync::{Arc,RWLock}; | |
use std::thread::Thread; | |
fn main() { | |
println!("running channels: "); | |
channels(); | |
println!("running locks: "); |
rsync (Everyone seems to like -z, but it is much slower for me)
- a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
- H: preserves hard-links
- A: preserves ACLs