This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require 'fileutils' | |
| ## | |
| # Creates a Sinatra project skeleton. | |
| # Assumes you are using erb, sass, and passenger. | |
| project_name = "" | |
| if ARGV[0] |
This file contains hidden or 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
| # The 'Person' class represents the basic attributes of a person in the application. | |
| class Person | |
| # Define a setter and getter for the "name" attribute | |
| attr_accessor :name | |
| # Pass a name to the 'new' method to initialize a person with their name. | |
| def initialize(name) | |
| @name = name | |
| end |
This file contains hidden or 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
| ls -1 *.avi | while read file; do new_file=$(echo $file | sed s/\ /_/g); mv "$file" "$new_file"; done |
This file contains hidden or 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 | |
| # curl -s https://gist.githubusercontent.com/movesmyers/5412517/raw | sudo bash | |
| sudo apt-get install -y curl build-essential git-core bison openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libghc6-zlib-dev libssl-dev libyaml-dev libxml2-dev libxslt1-dev autoconf libc6-dev libncurses5-dev libcurl4-openssl-dev libruby apache2-prefork-dev libapr1-dev libaprutil1-dev libffi-dev tcl-dev tk-dev | |
| cd ~ && curl -O http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz && tar -xvf ruby-2.1.2.tar.gz && cd ruby-2.1.2 | |
| ./configure && make && make test && sudo make install |