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
[alias] | |
where = log --decorate --pretty=short -n1 | |
lol = log --pretty=oneline --graph --decorate --stat | |
lg = log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset' --abbrev-commit | |
st = status -sb | |
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
{ | |
"ensure_newline_at_eof_on_save": true, | |
"font_size": 9, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"rulers": | |
[ | |
80 |
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
# support/feature_macros.rb | |
module FeaturesMacros | |
def signin_admin | |
DatabaseCleaner.clean | |
@user ||= FactoryGirl.create(:user) | |
visit '/sign_in' | |
within("#new_user") do | |
fill_in 'user[email]', :with => user.email |
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
# what i'm using for my bash git prompt today | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
BLUE="\[\033[0;34m\]" | |
LIGHT_RED="\[\033[1;31m\]" | |
LIGHT_GREEN="\[\033[1;32m\]" | |
WHITE="\[\033[1;37m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" |
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
RSpec.configure do |config| | |
config.before(:suite) do | |
DatabaseCleaner.strategy = :truncation | |
end | |
config.before(:each) do | |
DatabaseCleaner.start | |
end | |
config.after(:each) do |
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
require 'ostruct' | |
# use dot notation on nested hash/arrays | |
# based on http://andreapavoni.com/blog/2013/4/create-recursive-openstruct-from-a-ruby-hash/#.U3NjHXWx3AF | |
# but extended to deal with arrays | |
# or you could just use https://github.com/jsuchal/hashugar | |
class DeepStruct < OpenStruct |
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
{ | |
groupy: { | |
invited: { | |
eventOne: true, | |
eventTwo: false | |
}, | |
responded: { | |
eventOne: false, | |
eventTwo: false | |
} |
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
[live] | |
live ansible_ssh_host=12.34.56.78 ansible_ssh_user=ubuntu |
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
# pommes, mele same as apples | |
@shop = { | |
apples: 100, | |
cherries: 75, | |
bananas: 150, | |
pommes: 100, | |
mele: 100 | |
} |
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
#!/bin/sh | |
# working folder. world store, etc | |
cd /home/skinofstars/mc | |
rsync --rsh='ssh -p25561' -avz [email protected]:mcsrv/* world_folder | |
cd world_folder | |
# so anyone can read the log |