Skip to content

Instantly share code, notes, and snippets.

View trivett's full-sized avatar
🚲
Bikes + JavaScript

Vincent trivett

🚲
Bikes + JavaScript
View GitHub Profile
@trivett
trivett / vocabquiz.rb
Created November 29, 2013 18:30
Command line program for testing your counting in a foreign language. Feel free to add a new language and build up the total list of words as far as desired. Want to throw in Swedish? Have at it. Care to add numbers up to 100 in French? Just put them in order.
puts "Welcome to the Number Vocabulary Test Program"
puts "A simple program for learning your numbers in a foreign language."
words = {
"Japanese" => ['zero','ichi','ni','san','yon','go','roku','shichi','hachi','kyuu','juu','juuichi','juuni','juusan'],
"Spanish" => ['cero','uno','dos','tres','cuatro','cinco','seis','siete','ocho','nueve','diez'],
"German" => ['null','eins','zwei','drei','vier','funf','sechs','sieben','acht','neun', 'zehn']
}
def play(words)
@trivett
trivett / numberwang.rb
Created February 27, 2014 16:09
this is numberwang!
# http://www.youtube.com/watch?v=qjOZtWZ56lc
class Numeric
def is_numberwang?
rand(5) == 0
end
end
i = 0
def play(i)
while i < 2
@trivett
trivett / resources.md
Created July 10, 2015 01:13
Learning Resources

1#Some useful resources for learning Ruby

@trivett
trivett / lexicon_homework.md
Last active October 24, 2015 18:06
BEWD Homework one

#Class 1 Homework

On your own, create a directory called 'lexicon' in your computer somewhere like Documents or desktop. Wherever you like is fine.

In your new folder, create a file called class_1_command_line_git.md

Open it by typing subl class_1_command_line_git.md in the terminal

Paste in the following lines with all of the new terms and commands that you learned today and define them in your own words. Commit your definitions and push it up to a new git repo on Github. If there are any other terms that you took down in your notes, feel free to add them. Note that this is written in Markdown, which is good to know since Github uses it for readme files.

puts "Adding a Whole bunch of movies"
Movie.create [
{
title: "The Shawshank Redemption",
description: "Morgan Freeman in Jail",
year_released: 1994
},
{
title: "The Godfather",
description: "Hard core Gangster activity",
@trivett
trivett / seed.rb
Last active December 19, 2015 16:02
use these seeds in your happitails app
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
# Examples:
#
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel', city: cities.first)
puts "Seeding happitails!"
@trivett
trivett / happitails_on_rails.md
Created December 22, 2015 02:23
second midterm for BEWD

#Happitails on Rails

Your client, the Happitails shelter, is unsatisfied with the 80s command line program we made in November. They got some seriously pretentious hipster volunteer that demands only the best when it comes to web apps. They are all like, if this doesn't make Product Hunt you're fired. They have a grand vision that ALL shelters and ALL animal lovers will connect via this app, so it will have to support multiple shelters. However, they don't seem to give a hoot about the front end design.

##Your Assignment:

Work in groups of no fewer than two or more than four, but make sure that you have your own code on your laptop.

@trivett
trivett / learning_on_your_own.md
Last active January 30, 2016 21:21
Learning on your own

#Some useful resources for learning on your own.

Hello all! It was truly an honor introducing you all to web programming and helping you grow as programmers. Personally, this was an incredible experience for me, and I hope that you are happy with your experience.

But this is only the beginning! Programming is a never-ending process of learning

  • Ruby docs READ THE DOCS!
  • Rails Guides Best docs for Rails topics.
  • GA alumni perks The best perk in my opinion is the 50% off on O'Reilly books. O'Reilly has an incredible selection of up-to-date books on all sorts of programming/IT topics.
  • Dash for Mac Good mac app for quickly searching documentation.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
</body>
</html>
// Place your settings in this file to overwrite the default settings
{
"editor.fontFamily": "Hack, Fira Mono for Powerline,Menlo, Monaco, 'Courier New', monospace",
"editor.fontSize": 15,
"editor.tabSize": 2,
"editor.wordWrap": "on",
"workbench.colorTheme": "Eagle Oceanic Next",
"editor.wordWrap": "on",
"window.zoomLevel": 0,
"editor.renderIndentGuides": false,