Skip to content

Instantly share code, notes, and snippets.

View fakefarm's full-sized avatar
🐽
🦁🍎🐸🧄🐔🍐🐹🍑🐮 🐴🦆🥦🐙🐳F🦞🧅🐶 🦧👾A🦈🐋🍉K🌽 🐣🐎🦚🦩🦔🐿🦨🐉🥕 🐿🐾🐒🍊E🐈🐻🥥🐱 🐼🥑🐷🐓🍌🐖F🦃 🐑🚜🍋🐂A🐏🌾🤖🐀🦔 R🦜🦝🐈🦓🐠🦑🦂M🐜

Dave Woodall fakefarm

🐽
🦁🍎🐸🧄🐔🍐🐹🍑🐮 🐴🦆🥦🐙🐳F🦞🧅🐶 🦧👾A🦈🐋🍉K🌽 🐣🐎🦚🦩🦔🐿🦨🐉🥕 🐿🐾🐒🍊E🐈🐻🥥🐱 🐼🥑🐷🐓🍌🐖F🦃 🐑🚜🍋🐂A🐏🌾🤖🐀🦔 R🦜🦝🐈🦓🐠🦑🦂M🐜
View GitHub Profile
@fakefarm
fakefarm / amazon2.rb
Created April 15, 2012 02:00
Code Academy exercise
# Exercise 1 : Your output should look like this: "Your total with tax is $4455.54."
shopping_cart = [
{:name => "iPad 2", :price => 499, :quantity => 2},
{:name => "iMac 27", :price => 1699, :quantity => 1},
{:name => "MacBook Air 13", :price => 1299, :quantity => 1}
]
@fakefarm
fakefarm / projectEuler
Created April 17, 2012 12:41
Euler problem 3
# The prime factors of 13195 are 5, 7, 13 and 29.
# What is the largest prime factor of the number 600851475143 ?
number = 24
array = []
# how do I iterate a number? Is that a loop?
array.each do |num|
if num % 1 == 0
array << 1
@fakefarm
fakefarm / Experiments.rb
Created April 17, 2012 14:53
Code Academy Class 3
class Animal
def name=(nick_name)
@name = nick_name
end
def name
return @name
end
@fakefarm
fakefarm / amazon.rb
Created April 19, 2012 21:35
Code Academy exercise
# Make the code below work by creating two classes: Item and Cart.
# HINT: It may help to use arrays and hashes inside your Cart class.
# Don't worry about sales tax for now.
class Item
def initialize(name, price)
@name = name
@price = price
end
@fakefarm
fakefarm / pricelist.rb
Created May 9, 2012 19:35
Coding a pricelist matrix
puts "How many shirts?"
quantity = gets.chomp.to_i
puts "how many colors?"
colors = gets.chomp.to_i
pricelist = [
[1.30,1.85,2.50], # 1 - 35 pieces
[0.95, 1.30, 1.70,2.20,2.5 ], # 36 - 71 pieces
@fakefarm
fakefarm / how to make this real
Created August 29, 2013 23:38
can you make this work?
$("#task-row").each(function(){
if $('#task-row').value('@'){
this.addClass("highlight");
}
});
@fakefarm
fakefarm / Countdown.html
Created August 31, 2013 17:50
How do I enter a number to count down, then watch it drop?
<!DOCTYPE html>
<html>
<head>
<title>Count Down</title>
<style type="text/css"> .styles {font: bold 24pt sans; padding: 10px; border: 2px solid black; border-radius: 2px; } </style>
</head>
<body>
<h1>Countdown</h1>
<span class="styles" id="countdown"></span> <!-- The time gets inserted here -->
<script>
@fakefarm
fakefarm / mulder.scss
Created October 22, 2013 08:02
Life without bootstrap
body {
font-family: courier;
width: 60%;
margin: 0 auto;
font-size: 100%;
}
form{
overflow: auto;
}
@fakefarm
fakefarm / gist:7470789
Created November 14, 2013 17:27
MM sass errors
coffee_talk (master) $ be middleman build
/Users/dave/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:216: warning: Insecure world writable dir /Users/dave/Dropbox/300_code/303_sandbox in PATH, mode 040777
Loaded Bourbon Neat
/Users/dave/Dropbox/300_code/303_sandbox/316_middleman/coffee_talk/source/stylesheets/base/base.scss:4: Undefined variable: "$tan". (Sass::SyntaxError)
(in /Users/dave/Dropbox/300_code/303_sandbox/316_middleman/coffee_talk/source/stylesheets/base/base.scss:4)
from /Users/dave/Dropbox/300_code/303_sandbox/316_middleman/coffee_talk/vendor/bundle/gems/sass-3.2.12/lib/sass/script/variable.rb:49:in `_perform'
from /Users/dave/Dropbox/300_code/303_sandbox/316_middleman/coffee_talk/vendor/bundle/gems/sass-3.2.12/lib/sass/script/node.rb:40:in `perform'
from /Users/dave/Dropbox/300_code/303_sandbox/316_middleman/coffee_talk/vendor/bundle/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:298:in `visit_prop'
from /Users/dave/Dropbox/300_code/303_sand
Add after rails gem...
-------------
gem 'neat'
gem 'pg'
gem "haml-rails"
gem 'meta-tags', :require => 'meta_tags'
gem 'thin'
gem 'redcarpet', '1.17.2'
gem 'omniauth-facebook'
gem 'jquery-ui-rails'