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
# Why I get stack level too deep in IRB, when calling: | |
# location = VendorLocation.find 53575 | |
# LocationCalendarDayHours.from_java_json(location.calendarHours).first.weekday_type_code | |
# | |
# Note: I created weekday_type.rb as a WwConstant | |
class LocationCalendarDayHours | |
include ActiveModel::Model | |
include WWLegacyJavaJsonSupport |
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
for filename in *@2x*; do mv "$filename" "${filename//@2x/_2x}"; done |
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
##Based on: https://gist.github.com/871284e41058014863e0 | |
MAGENTA="\033[1;31m" | |
ORANGE="\033[1;33m" | |
GREEN="\033[1;32m" | |
PURPLE="\033[1;35m" | |
WHITE="\033[1;37m" | |
BOLD="" | |
RESET="\033[m" | |
parse_git_dirty () { |
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
[alias] | |
co = checkout | |
a = add | |
s = show | |
st = status | |
d = diff | |
ds = diff --staged | |
ci = commit | |
br = branch | |
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short |
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
#!/usr/bin/env ruby | |
# List all keys stored in memcache. | |
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place. | |
require 'net/telnet' | |
headings = %w(id expires bytes cache_key) | |
rows = [] |
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
// ---- | |
// Sass (v3.4.12) | |
// Compass (v1.0.3) | |
// ---- | |
// Width | |
@each $index, $width in (1: 15%, 2: 30%, 4: 45%) { | |
.collage-width-#{$index} { | |
width: $width; |
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
// ---- | |
// Sass (v3.4.12) | |
// Compass (v1.0.3) | |
// ---- | |
//Width | |
@each $index, $width in (1: 15%, 2: 30%, 4: 45%) { | |
.collage-width-#{$index} { | |
width: $width; | |
overflow: hidden; |
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 Codebreaker | |
class Game | |
def initialize(output) | |
@output = output | |
end | |
def start(secret) | |
@secret = secret | |
@output.puts 'Welcome to Codebreaker!' | |
@output.puts 'Enter guess:' |
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
#Remember to get the proper gems on your gem file: | |
# gem 'database_cleaner', '>= 0.5.2' | |
# gem 'selenium-client', '>= 1.2.18' | |
# then: bundle install | |
#Step 1 for using Selenium. This goes after ActionContoller allow_resque line /Americo | |
Cucumber::Rails::World.use_transactional_fixtures = false | |
#Step 2 for using Selenium This goes at the bottom of the file /Americo | |
class ActiveSupport::TestCase |
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
Set Repo | |
$ git init | |
Add all files/folders | |
$ git add . | |
Push up code | |
$ git remote add origin git@githyb.com:<username>/app_name.git | |
$ git push origin master |
OlderNewer