Skip to content

Instantly share code, notes, and snippets.

View chris-skud's full-sized avatar

Chris Skudlarczyk chris-skud

View GitHub Profile
@chris-skud
chris-skud / exec_cmdline_or_rspec.rb
Last active August 29, 2015 14:05
trick to exec ruby file from shell or rails
#!/usr/bin/env ruby
$:.unshift File.dirname(__FILE__)
require ‘<the_module>’
#run if command line, do not if required (called from rspec)
if $0 == __FILE__
require File.join(File.expand_path("..", Dir.pwd), 'path/to/other/rubies')
<TheClass>.provider_pull
end
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management