Skip to content

Instantly share code, notes, and snippets.

# Aliases in this file are bash and zsh compatible # Don't change. The following determines where YADR is installed.
yadr=$HOME/.yadr
alias .='pwd'
# Get operating system
platform='unknown'
unamestr=$(uname)
if [[ $unamestr == 'Linux' ]]; then
platform='linux'
elif [[ $unamestr == 'Darwin' ]]; then
platform='darwin'
# ~/.tmuxinator/rails.yml
name: rails
root: ~/workspace/ruby/rails/ember-cli/address-book
# Optional tmux socket
# socket_name: foo
# Runs before everything. Use it to start daemons etc.
pre: postgres, bundle install
# Aliases in this file are bash and zsh compatible
# Don't change. The following determines where YADR is installed.
yadr=$HOME/.yadr
alias .='pwd'
# Get operating system
platform='unknown'
unamestr=$(uname)
if [[ $unamestr == 'Linux' ]]; then
platform='linux'
@rocknrollMarc
rocknrollMarc / .guard.rb
Last active August 29, 2015 14:13 — forked from doitian/.guard.rb
require 'guard/notifier'
notifiers_options = {
:emacs => {
:fontcolor => "#acbc90",
:default => "#1e2320",
:success => "#013009",
:failed => "#310602",
:pending => "#534626"
},
@rocknrollMarc
rocknrollMarc / gist:e1e16cf2186de420e759
Last active August 29, 2015 14:08
undefined method `relation_delegate_class'
require 'set'
require 'active_support/concern'
require 'active_support/deprecation'
module ActiveRecord
module Delegation # :nodoc:
module DelegateCache
def relation_delegate_class(klass) # :nodoc:
@relation_delegate_cache[klass]
end
@rocknrollMarc
rocknrollMarc / GistList!.md
Created November 5, 2014 19:08
Try GistList for iOS! http://gistlist.io/

##alt text GistList: TODO for coders alt text

'use strict';
/**
* @ngdoc function
* @name hlApp.controller:MainCtrl
* @description
* # MainCtrl
* Controller of the hlApp
*/
angular.module('hlApp')
@rocknrollMarc
rocknrollMarc / apps.rb
Created September 1, 2014 15:58 — forked from achiurizo/apps.rb
# foo.rb
class Foo < ::Sinatra::Base
class << self
def dependencies; []; end
def setup_application!; end
end
get '/' do
'wubwub'
@rocknrollMarc
rocknrollMarc / gist:39779fbb215b78f291f4
Created August 30, 2014 12:26
Padrino FactoryGirl Capybara spec_helper
PADRINO_ENV = 'test' unless defined?(PADRINO_ENV)
require 'rubygems'
require 'spork'
Spork.prefork do
# Loading more in this block will cause your tests to run faster. However,
# if you change any configuration or code from libraries loaded here, you'll
# need to restart spork for it take effect.
@rocknrollMarc
rocknrollMarc / gist:6dc6de955276c2c13a64
Created August 15, 2014 09:37
ruby Step definition parser cucumber, gherkin
step_definition_dir = "../features/step_definitions"
steps = []
Dir.glob(File.join(step_definition_dir,'**/*.rb')).each do |step_file|
File.new(step_file).read.each_line do |line|
next unless line =~ /^\s*(?:Given|When|Then)\s+\//
matches = /(Given|When|Then)\s*\/(.*)\/([imxo]*)\s*do\s*(?:$|\|(.*)\|)/.match(line).captures
type = matches[0]
matches[1] = Regexp.new(matches[1])
step = matches[1].inspect
step = step[2..step.length-3]