Skip to content

Instantly share code, notes, and snippets.

# 0. Intro to objects
## Everything is object
We will begin our journey with objects.
In Ruby, just like in real life, our world is filled with objects. Everything is an object - integers, characters, text, arrays - everything.
To make things happen using Ruby, one always puts oneself in the place of an object and then has conversations with other objects, telling them to do stuff.
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@uroborus
uroborus / base64.sh
Created October 1, 2015 18:27 — forked from dex4er/base64.sh
Perl oneliners
# Encoding file
perl -MMIME::Base64 -0777 -ne 'print encode_base64($_)' < file
# Decoding file
perl -MMIME::Base64 -ne 'print decode_base64($_)' < file.b64
# HMAC-SHA1
perl -MDigest::HMAC_SHA1 -le '$_=Digest::HMAC_SHA1->new($ARGV[0])->add($ARGV[1])->b64digest; $_.="=" x length % 4; print' TestKey TestString
@uroborus
uroborus / brew_install_coreutils.sh
Created May 18, 2016 01:54 — forked from epcim/brew_install_coreutils.sh
OSX brew install GNU coreutils, bin utils etc...
# From https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/
export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH"
brew install coreutils
brew install gnu-tar --with-default-names
# alternatively
brew install binutils
brew install diffutils