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
<theme> | |
<!-- Window Style --> | |
<color id="foreground" red="0.59" green="0.80" blue="0.99" alpha="1.0" /> | |
<color id="background" red=".1" green=".1" blue=".1" alpha=".95" /> | |
<window foregroundColorID="foreground" backgroundColorID="background" shouldUseHUDScrollers="yes" /> | |
<!-- Text View Style --> | |
<color id="tag" red=".48" green=".48" blue=".48" alpha="1.0" /> | |
<color id="handle" extendsColorID="foreground" /> | |
<color id="insertionPoint" red=".4" green=".4" blue=".4" alpha="1.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
#!/usr/bin/env bash | |
# This is an RVM Project .rvmrc file, used to automatically load the ruby | |
# development environment upon cd'ing into the directory | |
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional. | |
environment_id="ruby-1.9.2-p136" | |
# | |
# First we attempt to load the desired environment directly from the environment |
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 | |
# Version (0.79) | |
# Created by Artem Titoulenko ([email protected]) | |
# clock in application. I'm tired of counting. | |
# C.rb -- Time keeping script. | |
# Call with no params to clock in/out | |
# Params: | |
# ? : are you clocked in? check | |
# log : peek at the work log |
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 String | |
def humanize | |
self.split(/[-_]/).map {|w| w.capitalize }.join(' ') | |
end | |
end |
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
export ORIG_GEM_PATH=${GEM_PATH:-} | |
export ORIG_GEM_HOME=${GEM_HOME:-} | |
export ORIG_PATH=${PATH} | |
omg() { | |
if [[ "$1" =~ "^h(elp)?\$" ]]; then | |
echo "Usage: omg [h|help|r|reset]" | |
elif [[ "$1" =~ "^r(eset)?\$" ]]; then | |
if [[ -z "$ORIG_GEM_HOME" ]]; then | |
unset GEM_HOME |
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
# | |
# Generate a unique token before the creating a | |
# new record. Option to specify an array of | |
# attributes as predicates for the uniqueness check. | |
# The tokenable attribute is always appended to | |
# the list of predicates. | |
# | |
# Example usage in a model: | |
# | |
# class Contribution < ActiveRecord::Base |
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
# When an RSpec test like this fails, | |
# | |
# @my_array.should == [@some_model, @some_model2] | |
# | |
# RSpec will call inspect on each of the objects to "help" you figure out | |
# what went wrong. Well, inspect will usually dump a TON OF SHIT and make trying | |
# to figure out why `@my_array` is not made up of `@some_model` and `@some_model2`. | |
# | |
# This little module and technique helps get around that. It will redefine `inspect` | |
# if you include it in your model object. |
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
#3366CC | |
#DC3912 | |
#FF9900 | |
#109618 | |
#990099 | |
#3B3EAC | |
#0099C6 | |
#DD4477 | |
#66AA00 | |
#B82E2E |
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
# frozen_string_literal: true | |
# `have_attr_reader` matcher for attr_reader | |
RSpec::Matchers.define :have_attr_reader do |field| | |
match do |object_instance| | |
object_instance.respond_to?(field) | |
end | |
failure_message do |object_instance| | |
"expected attr_reader for #{field} on #{object_instance}" |
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
# frozen_string_literal: true | |
RSpec::Matchers.alias_matcher :increment, :change do |desc| | |
desc.gsub("changed", "incremented").gsub("change", "increment") | |
end | |
RSpec::Matchers.alias_matcher :decrement, :change do |desc| | |
desc.gsub("changed", "decremented").gsub("change", "decrement").gsub("-", "") | |
end |
OlderNewer