Skip to content

Instantly share code, notes, and snippets.

View Githerdone's full-sized avatar

Jake Danforth Githerdone

View GitHub Profile
@Githerdone
Githerdone / javascrpt.js
Created August 14, 2013 21:49
best practice example
var PostIt = function(x, y, boardId) {
//Create post-it
var $div = $("<div class='post-it'><div class='header'><a href='#' id='close'>CLOSE</a></div><div class='content' contenteditable='true'></div></div>")
this.$element = $div;
var self = this;
function initialize() {
$div.draggable({
#red {
background-color: red;
width: 200px;
height: 200px;
}
#blue {
background-color: red;
width: 200px;
height: 200px;
.container {
/*
If you have a block-level element of a certain width, margin: 0 auto;
will how you center it inside its parent container.
See: http://bluerobot.com/web/css/center1.html
*/
margin: 0 auto;
width: 720px;
}
worked in various groups with gist posts. completed objectivs
/* Here is your chance to take over Socrates!
Spend 10 minutes on each of the following hacks to the socrates website.
Enter them in the console to make sure it works and then save
your results here.
Choose a new pair for each. Add your names to the section you complete.
@Githerdone
Githerdone / dabblet.css
Created July 9, 2013 16:48
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@Githerdone
Githerdone / index.html
Last active December 19, 2015 08:58 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>
class Vehicle
attr_reader :color, :wheels, :status, :gas
def initialize(args)
@color = args[:color]
@speed = :normal
@wheels = nil
@status = :normal_speed
@gas = :full
class Array
def pad!(min_size, value = nil)
if self.count >= min_size
return self
else
size_is = min_size - self.count
count = 0
while count < size_is
self << value
count += 1
def times_table(n)
(1..n).each do |row_num|
line = ""
(1..n).each{ |col_num| line += "#{row_num * col_num}\t"}
puts line
end
end
times_table(5)
@Githerdone
Githerdone / gist:5427956
Created April 21, 2013 00:20
times_table working in command line with output showing correct, but does not get the green light.
def times_table(n)
(1..n).each do |row_num|
line = ""
(1..n).each{ |col_num| line += "#{row_num * col_num}\t"}
puts line
end
end
times_table(5)