Skip to content

Instantly share code, notes, and snippets.

View andersr's full-sized avatar
😅
Focusing

Anders Ramsay andersr

😅
Focusing
View GitHub Profile
@andersr
andersr / fizzbuzz.rb
Last active December 23, 2015 23:19
FizzBuzz
fizz, buzz, fizz_buzz, no_buzz = [], [], [], []
(1..50).each do |n|
if (n % 3 == 0) && (n % 5 == 0)
fizz_buzz.push(n)
elsif n % 3 == 0
fizz.push(n)
elsif n % 5 == 0
buzz.push(n)
else
@andersr
andersr / SQL Command 1: Create Table artists
Last active December 23, 2015 21:49
FS 003 - SQL Schema and Tables
CREATE TABLE artists(
name TEXT,
age INTEGER,
instruments TEXT,
songs TEXT,
genres TEXT
);
@andersr
andersr / anders_ramsay_profile.md
Last active December 23, 2015 19:39
FS Profile
1. Hello Alien!
2. IF you have a left and a right arm AND IF you have something at the end of each arm that can grasp objects AND IF you are able to visually distinguish between different object shapes and colors, continue to the next step, ELSE stop here. No PBJ sandwich for you, sorry!
3. Henceforth, your Left Hand will be referred to as "LH" and your Right Arm will be referred to as "RH"
4. Next, we will collect and label all the objects on the table.
5. Reach out and grasp an object on the table.
6. IF the object is round and flat, this object is a "Plate" ELSE IF the object is soft to the touch, this object is "Bread Loaf" ELSE IF the object is narrow with one side that is sharp to the touch, this object is a "Knife" ELSE IF the object is hard, has a cylindrical shape and you can see a brown substance inside, this is a "Peanut Butter Jar" ELSE the object is a "Jelly Jar"
7. Set down the object in an empty space on the table and note the location of where you placed the object.
8. Repeat steps 5,6, a
@andersr
andersr / gist:6626928
Last active December 23, 2015 11:18
FS 003 Ruby Assessment
# Ruby Assessment: https://gist.github.com/aviflombaum/ae78e0559cf51a58aad7
# Name: Anders Ramsay
### 1. Arrays ###
array = ["Blake","Ashley","Jeff"]
# a. Add an element to an (existing) array.
array << "Bill"
@andersr
andersr / gist:6140340
Created August 2, 2013 14:37
application.rb
require File.expand_path('../boot', __FILE__)
require 'rails/all'
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
@andersr
andersr / gist:6140333
Created August 2, 2013 14:36
application.rb
require File.expand_path('../boot', __FILE__)
require 'rails/all'
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
// removed /sitewide from require_tree
//