Skip to content

Instantly share code, notes, and snippets.

View blackwatertepes's full-sized avatar
Relaxing

Tyler J. Kuhn blackwatertepes

Relaxing
View GitHub Profile
@blackwatertepes
blackwatertepes / pow
Created April 28, 2011 22:35
Shell script for creating/destroying/opening .pow symlinks
#!/bin/bash
# Scripts for creating/deleting/viewing pow symlinks
# Created by Tyler J. (first ever bash!!!)
a=`pwd`
b=`basename -a $a`
create()
{
# Create a pow symlink
@blackwatertepes
blackwatertepes / g.donut.js
Created May 13, 2012 16:31
A donut chart object to be used with the raphael.js library. Extended from the pie chart object.
/*
* g.Raphael 0.5 - Charting library, based on Raphaël
*
* Copyright (c) 2009 Dmitry Baranovskiy (http://g.raphaeljs.com)
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
*/
(function () {
function Piechart(paper, cx, cy, ir, or, values, opts) {
opts = opts || {};
@blackwatertepes
blackwatertepes / g.donutX.js
Created June 12, 2012 16:29
An advnaced donut(capabale of scaling each slice) chart object to be used with the raphael.js library. Extended from the pie chart object.
/*
* g.Raphael 0.5 - Charting library, based on Raphaël
*
* Copyright (c) 2009 Dmitry Baranovskiy (http://g.raphaeljs.com)
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
*/
(function () {
function DonutX(paper, cx, cy, ir, or, values, opts) {
opts = opts || {};
# This is how you define your own custom exception classes
class NoFruitError < StandardError
end
class FruitTree
attr_reader :age, :height, :fruit_type
@fruit_type = "fruit"
def initialize
Inheritance Model
class Car
attr_reader :color, :wheels, :cost
def initialize(args)
@wheels = 4
@color = args[:color]
@cost = :respectible
end
@blackwatertepes
blackwatertepes / gist:5138352
Created March 11, 2013 22:13
Layout Drill: Right-hand Navigation
.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;
}
@blackwatertepes
blackwatertepes / gist:5138354
Created March 11, 2013 22:13
Layout Drill: Right-hand Navigation
.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;
}
@blackwatertepes
blackwatertepes / gist:5138355
Created March 11, 2013 22:13
Layout Drill: Right-hand Navigation
.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;
}
@blackwatertepes
blackwatertepes / gist:5138356
Created March 11, 2013 22:13
Layout Drill: Right-hand Navigation
.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;
}