Skip to content

Instantly share code, notes, and snippets.

View 8ENs's full-sized avatar

Benjamin Sanders 8ENs

  • Whitehorse, Yukon
View GitHub Profile
@8ENs
8ENs / Exercises
Created May 11, 2015 18:39
Bookstore SQL
SELECT Exercises
Write SELECT statements to perform the following queries on the bookstore database.
Exercise 1
Fetch ISBN of all book editions published by the publisher "Random House". You should have 3 results.
Exercise 2
Instead of just their ISBN number, fetch their Book Title as well. You should still have the same 3 results but with more information. But instead of just one column, we should have 2 columns in the result set.
Exercise 3
@8ENs
8ENs / copy_wiki.rb
Last active August 29, 2015 14:20
244-FileIO
require 'rubygems'
require 'rest-client'
wiki_url = "http://en.wikipedia.org/"
wiki_local_filename = "wiki-page.html"
File.open(wiki_local_filename, "w") do |file|
file.write(RestClient.get(wiki_url))
end
@8ENs
8ENs / w1d4-hw.md
Last active August 29, 2015 14:20 — forked from kvirani/w1d4-hw.md

On the road to being a Power User

Take control of your development environment by using more of the keyboard and less of the mouse/trackpad. As you write your code, use (Mac and Sublime) keyboard commands/shortcuts to, well... kill it!

Mastering your text editor and Operating System (OS) will make you a more efficient and impressive developer.

Power User Commands

Don't just read about these. If any of these are foreign / unfamiliar to you, be sure to practice them and make a mental note to use them when possible.

@8ENs
8ENs / gist:9c5487146768f8c11918
Created April 28, 2015 18:01
Activity 56: Interactive Ruby (Practice)
vagrant [vagrant]> pry
[1] pry(main)> def say_hi(name)
[1] pry(main)* puts "Hi, #{name}"
[1] pry(main)* end
=> :say_hi
[2] pry(main)> say_hi("Benjamin")
Hi, Benjamin
=> nil
[3] pry(main)> int = 5
=> 5