Blog post here: http://developer.uservoice.com/entries/how-to-upgrade-a-rails-2.3.14-app-to-ruby-1.9.3/
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
source 'https://rubygems.org' | |
gem 'sinatra' | |
gem 'json' | |
gem 'omniauth' | |
gem 'omniauth-oauth2' | |
gem 'omniauth-github' | |
gem 'omniauth-facebook' | |
gem 'omniauth-twitter' | |
# gem 'omniauth-att', :path => File.expand_path("./../../omniauth-att", __FILE__) |
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 | |
# Custom vhosts setup on Mac OS X 10.8. | |
# | |
# * Stores vhost config files in /etc/apache2/extra/vhosts.d | |
# * Creates directories at ~/Sites/{domain} to house files to be served and log files | |
# * Appends an entry to your /etc/hosts file (if none exists) | |
# | |
# See: https://gist.github.com/nbrew/6527860 | |
# |
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
// based on and inspired by https://gist.github.com/1026439 and https://gist.github.com/3798781 | |
// | |
// MIT license. Use however you'd like. | |
// | |
// first, define our macro for delaying our transition: | |
#define PKWaitDelay(dly, block) dispatch_after(dispatch_time(DISPATCH_TIME_NOW,dly*100000),dispatch_get_main_queue(), ^{ block }) | |
// then, inside your AppDelegate.m in didFinishLaunchingWithOptions: | |
UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.window.frame]; |
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 | |
mkdir -p ~/Downloads/src | |
cd ~/Downloads/src | |
function uninstall_haxe() { | |
sudo rm -rf /usr/bin/haxe /usr/bin/haxelib /usr/lib/haxe | |
} | |
function install_haxe() { |
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
export PATH="/usr/local/bin:/usr/local/sbin:$PATH:~/bin:/usr/local/mysql/bin:/usr/local/mongodb/bin:/Users/nathan/workspace/Sandbox/nbrew-git-achievements:/usr/local/android/tools" | |
export MANPATH="/usr/local/man:$PATH" | |
#export CPPFLAGS="-I/opt/local/include -I/Users/nathan/local/include" | |
export LDFLAGS="-L/usr/local/lib" | |
export LD_LIBRARY_PATH="/lib:/usr/lib:/usr/local/lib:/usr/local/mysql/lib" | |
export DISPLAY=:0.0 | |
export SVN_EDITOR=/usr/bin/vim | |
export HISTCONTROL='ignoredupes' | |
export EDITOR=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
// Sample Usage: | |
// var init_sortable_events = function() { | |
// var rl, category_id; | |
// jQuery('#list-info ul').each(function(index, element){ | |
// category_id = element.id.split('_')[1]; | |
// rl = new ReorderableList(); | |
// rl.reorder_action_element = '#event_category_events_reorder_action_' + category_id; | |
// rl.reorder_action_done_element = '#event_category_events_reorder_action_done_' + category_id; | |
// rl.sortable_list_id = '#' + element.id; | |
// rl.update_url = '/admin/events/update_positions'; |
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 | |
# If rvm is already installed: | |
# rvm implode | |
# install rvm | |
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) | |
# install ruby requirements specific to the rvm env: | |
rvm pkg install readline && rvm pkg install iconv |
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
# CVE should be in the format of CVE-xxxx-xxxx | |
function verify_cve_applied() { | |
package=$1 | |
cve=$2 | |
rpm -q --changelog ${package} | grep ${cve} | |
return $? | |
} |
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 | |
# Attempts to install the web application vulnerability scanner w3af and it's prerequisites. | |
# For more information about w3af, see: http://w3af.sourceforge.net/ | |
# USAGE: pypi_install package_name version_number md5_checksum | |
# checksum is optional; package and version are required | |
function pypi_install() { | |
name=$1 | |
version=$2 |