Skip to content

Instantly share code, notes, and snippets.

@panicbus
panicbus / gist:6735117
Last active December 24, 2015 03:09 — forked from featherart/gist:6734826
This is Quiz1. I made it through the hashes part only. Also, couldn't get my array to only print once.
# This is our first week's !quiz Let's find out what we know.
#
# The ideal range of your motor cycle speed 20 - 55. Over 55 is SCAREE!
# Check if your moto_speed is within that range using boolean (&&, ||)
# operators and comparison operators (== =< >= !=)
# if your moto_speed variable is in the right range print out a good
# message, aka "Wheee!" Otherwise print out an appropriate response.
@panicbus
panicbus / gist:6746612
Created September 28, 2013 21:13 — forked from featherart/gist:6745715
Feather's array review quiz
# create an Array of 4 shoes
# iterate through your Array using each and {}'s
# and show a list of your shoes
# create an Array of 4 outfits using Array.new
@panicbus
panicbus / gist:6771970
Last active February 20, 2017 23:53 — forked from spencereldred/gist:6766356
Spencer's Happy Tails
# happy_tails.rb
# Spencer Eldred
# Sept 27, 2013
# Activity:
# You are the manager at HappiTails animal shelter. You need to manage your shelter by storing and manipulating information about clients and animals.
# Object Specs:
# Animal:
# An animal should have a name, an age, a gender, a species, and can have multiple toys.
require 'sinatra'
require 'sinatra/reloader'
require 'yahoofinance'
get '/' do
@method = "post"
@action = "/stock"
erb :form
@panicbus
panicbus / gist:6821679
Last active December 24, 2015 15:39
Nico's first WDI Book Report

##Don't make me wave!

My book report isn’t on a blog post or argument per se, but a technology that appears to be coming into fashion. Yesterday an article came out on Hacker News declaring that Flutter has been acquired by Google. Flutter is a motion sensor technology that controls apps or devices on your laptop by waving your hand in front of its little webcam camera. Google has evidently seen the future here.

Another company with a very similar product is just now starting their first production run. LeapMotion makes use of infrared LEDS triangulated in a motion field that extends from a small device that’s just now being embedded in laptops. A cone of detection extends upward from your computer and you wave your hands through it to manipulate programs, most usefully probably for 3-D drawing when a Z axis is needed.

I’m actually somewhat conflicted about this new technology trend. On the one hand I feel like advancements, whatever they may be, a

@panicbus
panicbus / debug_1.md
Last active December 24, 2015 17:09 — forked from OfTheDelmer/debug_1.md

#Debugging (Use The Duck… )

Find the errors in the following

1.)

##jQuery

###Basics

  • Little bit of background on jQuery
  • How to include it
  • How to make sure it's included and works
  • How to use the documentation to explore methods (in the course of this class)

###Select elements and add property $('#topsquare').addClass('white-text');

@panicbus
panicbus / gist:6930528
Created October 11, 2013 06:45
Book report number 2

'You throw yourself off a cliff and you assemble an airplane on the way down.'

This is a quote from LinkedIn founded Reid Hoffman in an article called Fail to Succeed in the UK edition of Wired, which gives a series of examples of how failing, or the threat of failure, has produced some of the most successful entrepreneurial endeavors of this century.

The analogy of throwing yourself off a cliff really hits home for me. Even when the stakes aren’t exactly gigantic, no other activity can generate a greater yield of learning moments than risk taking, no matter what size they may be. It gives you an ability to adapt quickly, allows for a heightened awareness of danger, and perspective on what stagnation can do to your overall sense of well-being. It also gives you an opportunity to control your own destiny. Which is a huge factor in achieving goals. I think it’s important to live a life that involves a lot of time spent outsi

@panicbus
panicbus / index.md
Created October 22, 2013 04:03 — forked from rstacruz/index.md

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

# There are 4 basic steps to implementing your ActionMailer functionality in a Rails app:
# Step 1. Create your ActionMailer object. Remember that it can have any name, but should finish with "Mailer":
rails g mailer UserMailer
class UserMailer < ActionMailer::Base
default from: "fred@fred.com"
def confirm_user(user)
@user = user