Skip to content

Instantly share code, notes, and snippets.

View timkellogg's full-sized avatar

Tim timkellogg

  • Los Angeles
View GitHub Profile
@timkellogg
timkellogg / index.html
Created December 5, 2014 20:31
Ping Pong Epicodus Test
<!DOCTYPE <html>
<head>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="styles/styles.css">
<title>PingPongPage</title>
</head>
<body>
<h1>Ping Pong Page</h1>
<div class = "container">
<button class="btn" onclick="numberGame()">Play!</button>
@timkellogg
timkellogg / index.html
Last active August 29, 2015 14:10
Epicodus Layout Test - Basic WebPage
<!DOCTYPE <html>
<head>
<link rel="stylesheet" type="text/css" href="styles.css">
<title>Layout Test</title>
</head>
<body>
<div class="wrapper">
<div class="main-banner"><h1>Simple 2 column CSS layout, final layout<h1></div>
<div class="buttonrow">
<ul class="buttonrow-ul">
@timkellogg
timkellogg / index.html
Created December 7, 2014 01:05
Epicodus Layout Test - Custom Responsive CSS
<!DOCTYPE <html>
<head>
<!-- Fonts -->
<!-- Main Title -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<!-- Buttons -->
<link href='http://fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css'>
<!-- Text -->
<link href='http://fonts.googleapis.com/css?family=Indie+Flower' rel='stylesheet' type='text/css'>
@timkellogg
timkellogg / index.html
Created December 7, 2014 03:09
Epicodus Layout Test - Bootstrap Version
<!DOCTYPE <html>
<html lang="en">
<head>
<!-- Meta Tags -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<!-- Styles -->
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
@timkellogg
timkellogg / reset.css
Created December 8, 2014 04:05
CSS Reset Fix for Default <li> padding
ul {
margin: 0;
padding: 0;
}
#!/bin/bash
function main {
`echo clear`
echo "Phonebooks on record:"
`echo find ~ -type f -name \*.dat`
echo ""
echo "Please select which phonebook"
echo "you would like to modify."
echo "Or you can create a newfile"
@timkellogg
timkellogg / Shell Commands
Last active August 29, 2015 14:19
Useful Shell Commands
Find size of Rails app files in order
$ clear && ls -lr | awk '{ print $5 "--" $9 }' | sort -gr
Sample Output:
5563--Gemfile.lock
1814--Guardfile
821--Gemfile
408--config
306--testss
272--app
255--README.md
@timkellogg
timkellogg / blackjack.rb
Last active August 29, 2015 14:20
Game Suite in Bash/Ruby Scripting
#!/usr/bin/env ruby
# Draws the first cards for the game
def first_draw
@player_hand = @deck.to_a.sample(2).to_h
@computer_hand = @deck.to_a.sample(2).to_h
puts "Your Hand: #{@player_hand.keys.first} #{@player_hand.keys.last}"
puts "Computer's Hand: #{@computer_hand.keys.first}"
check_ace
@timkellogg
timkellogg / Fibonacci.rb
Last active August 29, 2015 14:20
Interview Challenges
puts "Enter a number you want to calculate up to in the Fibonacci sequence"
max = gets.chomp
#Fibonacci
sequence = []
0.upto(max.to_i) do |num|
if num > 2
what_to_push = sequence[num - 1] + sequence[num - 2]
sequence << what_to_push
else
#!/usr/bin/env ruby
require 'rubygems'
require 'fileutils'
require 'colorize'
puts `brew install tree`
puts `gem install colorize`
puts 'What are the names of the contributers?'