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
#!/bin/sh | |
# John Meehan 2013 | |
# | |
# DESCRIPTION: | |
# Setups up tmux, Rails server and MongoDB | |
# USEAGE: | |
# Put this script within the main directory of a Rails App | |
# Call ./tmux_setup.sh to run |
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
# John Meehan | |
# Rake Task for gem dev | |
# handy for opening a irb console for debugging Ruby Gems in development. | |
# just put this rake task into your rake file | |
# | |
desc "Open an irb console with this gems library" | |
task :console do | |
sh "irb -rubygems -I lib -r MyGemNameHere.rb" | |
end |
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
tail -f file.log | grep "foobar" |
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
# require 'pry'; binding.pry | |
# Rails Project Template | |
# Run with: | |
# rails new MyApp -T -m http://............. | |
# John Meehan 2015 | |
# Set the ruby version to that of the RVM | |
insert_into_file('Gemfile', "ruby '#{RUBY_VERSION}'\n", :before => /^ *gem 'rails'/, :force => false) | |
# Set the Gemset name based on the Rails app name | |
insert_into_file('Gemfile', "#ruby-gemset=#{@app_name}\n", :before => /^ *gem 'rails'/, :force => false) |
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
#!/bin/sh | |
# John Meehan 2014 | |
# DESCRIPTION: | |
# Set up Sublime Text 3 to open from the terminal in Yosemite | |
# USEAGE: | |
# run this script in the terminal | |
# open current directory in sublime by typing: subl . | |
sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/bin/subl |
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
#!/bin/bash | |
# This script is designed for Ubuntu 12.04 | |
# Should mostly work on 11.10 except Heroku install but not tested | |
# run with . <filename>.sh | |
# Get password to be used with sudo commands | |
# Script still requires password entry during rvm and heroku installs | |
echo -n "Enter password to be used for sudo commands:" | |
read -s password |
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
HTTP_STATUS_CODES = { | |
100 => 'Continue', | |
101 => 'Switching Protocols', | |
102 => 'Processing', | |
200 => 'OK', | |
201 => 'Created', | |
202 => 'Accepted', | |
203 => 'Non-Authoritative Information', | |
204 => 'No Content', | |
205 => 'Reset Content', |
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
#!/bin/bash | |
cat ~/.ssh/id_rsa.pub | pbcopy |
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
require 'nokogiri' | |
require 'open-uri' | |
require 'net/http' | |
require 'uri' | |
### | |
# Purpose: | |
# Needed to save 100 simularly named images stored remotely | |
# Result: Saves 100 png to the local ./icons/ folder | |
### |
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
# Rails Project Template | |
# Run with: | |
# rails new MyApp -T -m http://............. | |
# John Meehan 2016,2018 | |
# Set the ruby version to that of the RVM | |
def set_ruby_version | |
insert_into_file('Gemfile', "ruby '#{RUBY_VERSION}'\n", :before => /^ *gem 'rails'/, :force => false) | |
# Set the Gemset name based on the Rails app name | |
insert_into_file('Gemfile', "#ruby-gemset=#{@app_name}\n", :before => /^ *gem 'rails'/, :force => false) |
OlderNewer