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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
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
~/Downloads/tiger-build ~/dotfiles | |
apt package index updated less than 60 minutes ago | |
Reading package lists... | |
Building dependency tree... | |
Reading state information... | |
libjpeg-turbo8-dev is already the newest version. | |
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. | |
Reading package lists... | |
Building dependency tree... | |
Reading state information... |
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
// ==UserScript== | |
// @name UTM param stripper | |
// @author Paul Irish | |
// @namespace http://github.com/paulirish | |
// @version 1.2 | |
// @description Drop the UTM params from a URL when the page loads. | |
// @extra Cuz you know they're all ugly n shit. | |
// @include http*://* | |
// ==/UserScript== |
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
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common | |
sudo apt-get build-dep vim-gnome | |
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev mercurial libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev | |
sudo rm -rf /usr/local/share/vim | |
sudo rm /usr/bin/vim | |
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
require 'set' | |
class Week | |
DAYS = %w[Mon Tue Wed Thu Fri Sat Sun] | |
REVERTED_DAYS = DAYS.reverse | |
attr_reader :day_bitmask | |
def self.new(*days) |
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
# spec/spec_helper.rb | |
module RSpec::Rails::ViewExampleGroup::ExampleMethods | |
def render_once(*args, &block) | |
_rendered = self.class.instance_variable_get(:'@__rendered_once__') | |
_doc = self.class.instance_variable_get(:'@__doc_once__') | |
_view = self.class.instance_variable_get(:'@__view_once__') | |
if _rendered && _view | |
@rendered = _rendered |
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 @Moo | |
class @Mixin | |
constructor: -> | |
@boo = 'boo' | |
@mixin: (klass) -> | |
klass::mix = @::mix | |
klass::max = @::max | |
klass::getBoo = @::getBoo |
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
module Refines | |
refine Array do | |
def strictly_increasing? | |
each_cons(2).all? {|x, y| x < y } | |
end | |
end | |
refine String do | |
def char_indexes | |
each_char |
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
module Awesome | |
def self.Stuff(thingy) | |
Module.new do | |
class_methods = Module.new do | |
attr_accessor :thingy | |
end | |
define_singleton_method :included do |klass| | |
klass.extend(class_methods) | |
klass.thingy = thingy |
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 MyClass | |
def initialize | |
@thevalue = 42 | |
end | |
def omg | |
yield @thevalue | |
end | |
end |
NewerOlder