Skip to content

Instantly share code, notes, and snippets.

View ellijayne's full-sized avatar

EJ ellijayne

  • Catalpa International
  • Sydney
  • 01:16 (UTC +10:00)
View GitHub Profile
{
"VehicleInformation": {
"ID": "1",
"GLASSCODE": "ABA124SL--14VAW2016J",
"MANUFACTURER": "ABARTH",
"FAMILY": "124",
"VARIANT": "SPIDER LAUNCH EDITION",
"SERIES": null,
"ENGINE": "TURBO MPFI",
"CCap": "1368",
# == Schema Information
#
# Table name: users
#
# id :bigint(8) not null, primary key
# username :text
# email :text
# image :text
# created_at :datetime not null
# updated_at :datetime not null
#user sseds
User.destroy_all
user1 = User.create :username => 'elli_jayne', :email => '[email protected]'
#album seed info
Album.destroy_all
album1 = Album.create :title => 'Take Off Your Pants And Jacket', :date => '2001-12-06', :tracks => 'Anthem Part, Two Online Songs, First Date, Happy Holidays You Bastard, Story of a Lonely Guy, The Rock Show, Stay Together for the Kids, Roller Coaster, Reckless Abandon, Every Time I Look for You, Give Me One Good Reason, Shut Up, Please Take Me Home, Time to Break Up'
class SessionController < ApplicationController
def new
end
def create
user = User.find_by :username => params[:username]
if user.present? && user.authenticate(params[:password])
require 'pry'
require 'rainbow'
def plan_trip (line, start_stop, end_stop)
n_line = ["times square", "n_34th", "n_28th", "n_23rd", "union square", "n_8th"]
puts Rainbow(n_line).green
l_line = ["l_8th", "l_6th", "union square", "l_3rd", "l_1st"]
puts Rainbow(l_line).red
# Calculate a trip time and cost given inputs for
#
# distance
# miles per gallon
# price per gallon
# speed in miles per hour
require 'rainbow'
def calc_option
puts "Trip Calculator"
$(document).ready(function() {
const balance = {
savings: 0,
checking: 0
};
//trying to use function for both accs to go red when on $0
$(".balance").each(function(account) {
if $(balance[account] === 0) {
@ellijayne
ellijayne / atm bank js
Created June 24, 2018 08:48
atm bank html
$(document).ready(function() {
const balance = {
savings: 0,
checking: 0
};
//CHANGING COLOR ON $0...
const zeroBalance = function() {
if (balance[0] === '0') {
@ellijayne
ellijayne / gist:74e410a3cd9a84b0d187b2538dcbd0c8
Created June 16, 2018 23:40
javascript bank - Caleb's code..
const bank = {
//empty array of accounts
accounts: [],
};
//add account function pushing into the empty accounts array.
const addAccount = function (name, balance) {
let newAccount = {
accountName: name,
balance: balance,
@ellijayne
ellijayne / gist:a450c456076feec4035acbd05798fde2
Last active June 16, 2018 07:59
Javascript bank - need help with depositing money function
//create bank //
const bank = [
{name: 'Melanie Sills',
currentBalance: 500
},
{name: 'Susan Oram',
currentBalance: 100
},