Skip to content

Instantly share code, notes, and snippets.

View tjbladez's full-sized avatar

Nickolay Schwarz tjbladez

View GitHub Profile
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/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
#
:+1:
:-1:
:airplane:
:art:
:bear:
:beer:
:bike:
:bomb:
:book:
:bulb:
@tjbladez
tjbladez / pathname.rb
Created December 29, 2010 20:30
pathname
require 'pathname'
path = Pathname.new('.') # current directory
path += 'tests' # ./tests
path += 'functional' # ./tests/functional
path = path.parent # ./tests
path += 'config.yaml' # ./tests/config.yaml
path.read # contents of ./tests/config.yaml
path.open('w'){|io| io << "env: test"}
path.read # "env: test"
path.children{|p| puts p.inspect} # prints all the files/directories in ./tests