Pry Cheat Sheet
Command Line
pry -r ./config/app_init_file.rb
-- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
-- load your rails into a pry session
#!/usr/bin/env ruby | |
# | |
# CLI tool for locating and removing a Homebrew installation | |
# http://brew.sh/ | |
# | |
# Copyright (C) 2014 Stephen C. Benner | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or |
#!/usr/bin/env ruby | |
# | |
# If you've got a collection of Bash aliases that just keeps growing... Consider using YAML! | |
# | |
# This version is designed to parse aliases organized under named groups in the YAML | |
# file, so the first level of mappings are purely semantic, and are used to keep the | |
# data organized and well-documented. | |
# | |
require 'pathname' | |
require 'yaml' |
#!/usr/bin/env ruby | |
# | |
# Mac fix 4 - Disable CrashReporter | |
# | |
# CrashReporter is a daemon that monitors for crashes and generates a report (duh) when they occur. | |
# If an application (such as Finder) become stuck in an infinite crash loop, then sometimes it's | |
# desirable to just turn off CrashReporter entirely, as it will continually generate processes in | |
# the background which spew errors and logs, resulting in massive overhead to your system resources. | |
# | |
# DIAGNOSING: |
var jq = document.createElement('script'); | |
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
jQuery.noConflict(); |
pry -r ./config/app_init_file.rb
-- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
-- load your rails into a pry session#!/usr/bin/env ruby | |
# | |
# Mac fix 1 - Install the Nokogiri gem on Mac OS 10.9 Mavericks | |
# | |
# Usage: to configure and install using Bundler, pass in 'bundle' as an argument to the script. | |
# | |
# Nokogiri works at a very low level, so it has many issues on various platforms. | |
# As a result, the command `install gem nokogiri` often will fail. This fix is for | |
# errors involving 'libiconv', such as the following one I encountered: | |
# |
#!/usr/bin/env ruby | |
# | |
# This is a web scraper which downloads mp3 files from the TATW web archives. | |
# | |
# Usage: run this script and pass it an episode range to download via arguments | |
# | |
# Dependencies: requires 'aria2' to be installed (uses the CLI tool 'aria2c') | |
# | |
require 'pathname' | |
require 'colorize' # Use of this gem is optional; it makes the output prettier |
#!/usr/bin/env ruby | |
# | |
# This bit of code lets you define Environment variables in your shell via a YAML file. | |
# It works by composing Bash commands from the parsed data, meant to be executed within | |
# a Bash environment, which will export the variables just as in a regular Bash profile. | |
# This is accomplished by executing this script via the Bash substitution syntax $(...) | |
# which returns the output of evaluating whatever is inside the parenthesis, which in | |
# the case of this script would be appropriate 'export' commands that are run by Bash. | |
# | |
# This version is designed to parse aliases organized under named groups in the YAML |
One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.