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 'fileutils' | |
require 'win32-sound' | |
FILE_UTILS_NOOP = false | |
IMAGE_TYPES_REGEX = /.(jpg|gif|jpeg|png|mpg)$/i | |
DOC_TYPES_REGEX = /(?<!mavica).(doc|txt|docx|xls|xlsx|html|htm|zip)$/i | |
IMAGES_DIRECTORY = "C:/Users/Alec/Documents/floppys/images" | |
OTHER_DIRECTORY = "C:/Users/Alec/Documents/floppys/docs" | |
ALWAYS_IGNORE_REGEX = /(System Volume Information|.411|MAVICA.htm)$/i | |
FAILURE_WAV = "C:/Windows/Media/Windows Hardware Fail.wav" |
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 'rake' | |
gem 'aws-sdk' | |
gem 'dotenv' | |
gem 'chef' | |
gem 'librarian-chef' | |
gem 'knife-solo' | |
gem 'knife-solo_data_bag' |
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
puts "hash_without_default = Hash.new" | |
hash_without_default = Hash.new | |
print "hash_without_default[:key] # => " | |
puts hash_without_default[:key].inspect | |
print "hash_without_default[:key][:value] # => " | |
begin | |
puts hash_without_default[:key][:value].inspect | |
rescue => e |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "precise64" | |
config.vm.provision :chef_solo do |chef| | |
chef.environment = "development" | |
chef.environments_path = "environments" | |
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
S3_ACCESS_KEY_ID='SOME_SECRET_ID' | |
S3_SECRET_ACCESS_KEY='SOME_SECRET_KEY' | |
S3_BUCKET_NAME='SOME_BUCKET_NAME' |
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
class PostsController < ApplicationController | |
def show | |
@post = Post.find(params[:id]) | |
respond_to do |format| | |
format.html # GET /posts/1 | |
format.json { render :json => @post } # GET /posts/1.json | |
end | |
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
web: bundle exec puma -C config/puma.rb |
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
#! /usr/bin/env sh | |
# Generate a new, simple sinatra app | |
# Usage: sinatra-new name_of_app | |
set -e | |
dir=$1 | |
mkdir -p $dir/{views,public} | |
cd $dir |
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
var RailsForm = React.createClass({ | |
propTypes: { | |
csrf: React.PropTypes.shape({ | |
param: React.PropTypes.string, | |
token: React.PropTypes.string | |
}).isRequired | |
}, | |
getDefaultProps: function() { | |
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
diff -r app-with-ar/Gemfile app-without-ar/Gemfile | |
6,7d5 | |
< # Use sqlite3 as the database for Active Record | |
< gem 'sqlite3' | |
diff -r app-with-ar/Gemfile.lock app-without-ar/Gemfile.lock | |
97d96 | |
< sqlite3 (1.3.9) | |
123d121 | |
< sqlite3 | |
diff -r app-with-ar/config/application.rb app-without-ar/config/application.rb |
NewerOlder