###On your computer
Create a new folder in ~/ga_wdi called drills
Initalize a new git repo in drills
Add a Ruby file called first_date.rb
Add and commit the file
###On Github
Create a new repo called drills
| # http://git-scm.com/book/en/Getting-Started-First-Time-Git-Setup | |
| [user] | |
| name = Dwayne Sturgeon | |
| email = [email protected] | |
| [color] | |
| ui = true | |
| [alias] | |
| st = status -sb -uall | |
| lg = log --decorate --pretty=oneline --abbrev-commit --graph | |
| [core] |
| # _ _ __ _ _ | |
| # | |__ __ _ ___| |__ _ __ _ __ ___ / _(_) | ___ | |
| # | '_ \ / _` / __| '_ \ | '_ \| '__/ _ \| |_| | |/ _ \ | |
| # | |_) | (_| \__ \ | | | | |_) | | | (_) | _| | | __/ | |
| # |_.__/ \__,_|___/_| |_| | .__/|_| \___/|_| |_|_|\___| | |
| # |_| | |
| # When Bash starts, it executes the commands in this script | |
| # http://en.wikipedia.org/wiki/Bash_(Unix_shell) |
| { | |
| "caret_style": "phase", | |
| "color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme", | |
| "default_line_ending": "LF", | |
| "detect_indentation": true, | |
| // install source code pro fonts | |
| //"font_face": "SourceCodePro-Regular", | |
| "font_size": 13, | |
| "highlight_active_indent_guide": true, | |
| "highlight_line": true, |
For today's drill, we're going to be creating a site like Emergency Compliment, except it will be WDI themed.
When a user visits the site, they'll be greeted with a WDI pick me up that will hopefully cheer them up.
Create a basic Sinatra app inside your drills folder called pick_me_up Create your main.rb file and a views folder. In your views folder, you'll have a layout.erb file and a compliment.erb file.
| // Sublime User Preferences | |
| { | |
| "auto_complete": true, | |
| "auto_complete_commit_on_tab": true, | |
| "auto_match_enabled": true, | |
| "bold_folder_labels": true, | |
| "caret_extra_bottom": 2, | |
| "caret_extra_top": 2, | |
| "caret_extra_width": 2, | |
| "caret_style": "phase", |
| namespace :sinatra do | |
| desc "This makes a Sinatra app" | |
| task :create do | |
| puts "Project Name?" | |
| project = STDIN.gets.chomp | |
| unless Dir.exists?("#{project}_app") | |
| Dir.mkdir("#{project}_app") | |
| Dir.mkdir("#{project}_app/views") | |
| # add public folder |