Skip to content

Instantly share code, notes, and snippets.

View darthneel's full-sized avatar

Neel Patel darthneel

  • San Francisco, CA
View GitHub Profile
@darthneel
darthneel / environments.rb
Created October 7, 2014 18:45
Sample environments.rb for pushing Sinatra + PSQL to Heroku
#These Settings Establish the Proper Database Connection for Heroku Postgres
#The environment variable DATABASE_URL should be in the following format:
# => postgres://{user}:{password}@{host}:{port}/path
#This is automatically configured on Heroku, you only need to worry if you also
#want to run your app locally
require 'active_record'
configure :production, :development do
db = URI.parse(ENV['DATABASE_URL'] || 'postgres://localhost/projecttwo')
@darthneel
darthneel / database.yml
Created October 7, 2014 18:48
Sample database.yml file for pushing Sinatra + PSQL to Heroku
development:
adapter: postgresql
database: development
username: <%= ENV['PG_USER'] %>
password: <%= ENV['PG_PASS'] %>
host: localhost
@darthneel
darthneel / prework_checkin_mechanics.md
Last active August 29, 2015 14:08
Concepts and mechanics to prepare students for the first day of WDI

Pre-work Check in: Understanding Mechanics


###Questions to ask yourself:

Variables

  1. Can I define the term 'variable'?
@darthneel
darthneel / chmod.md
Created November 7, 2014 05:26
create executable file written in ruby

To create at executable

chmod 755 FILENAME


To write script in Ruby add #!/usr/bin/env ruby to top of file

@darthneel
darthneel / prework_checkin_part_2.md
Created November 10, 2014 20:34
Concepts and mechanics to prepare students for the first day of WDI

Pre-work Check in: Understanding Mechanics Part 2


TIP: You can open a new Terminal window and type irb to enter a Ruby prompt. On this screen you type and execute Ruby code, similar to what you were doing on Code Academy.


###Questions to ask yourself:

###Copy and paste each of the below steps into your Terminal.

###Be sure to do one at a time and wait for a command to finish before inputting the next one.


  1. mkdir ~/.temp_wdisubmit_gemfile

  2. git clone [email protected]:darthneel/wdi-submit-hw.git ~/.temp_wdisubmit_gemfile

function objectsAreEqual(objectA, objectB) {
if (objectA === objectB) {
return true;
}
var objectAKeys = Object.keys(objectA);
var objectBKeys = Object.keys(objectB);
if (objectAKeys.length != objectBKeys.length) {
function objectsAreEqual(objectA, objectB) {
var objectAKeys = Object.keys(objectA);
for (var i = 0; i < objectAKeys.length; i++) {
var prop = objectAKeys[i];
if (objectA[prop] !== objectB[prop]) {
return false;
}
};
<div class="box">
</div>

What to install before coming to the SQL Bootcamp

Everyone will need to install two tools to follow along during class:

  • MySQL Server, a mostly invisible program which stores information.
  • MySQL Workbench, a program designed to help you interact with the server.

Here's what to do: