Skip to content

Instantly share code, notes, and snippets.

🐦
Recovering the Satellites

Ian C. Anderson iancanderson

🐦
Recovering the Satellites
Block or report user

Report or block iancanderson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@iancanderson
iancanderson / Beer.hs
Created Apr 1, 2016 — forked from MattMSumner/Beer.hs
make it werrkkkk
View Beer.hs
data Hop = Hop {name :: String, alphaAcid :: Double} deriving (Show)
type BoilTime = Double
type Ounces = Double
data HopAddition = HopAddition Hop Ounces BoilTime deriving (Show)
data HomebrewRecipe = HomebrewRecipe [HopAddition] deriving (Show)
-- http://www.realbeer.com/hops/FAQ.html#units
recipeIbus :: HomebrewRecipe -> Double
recipeIbus (HomebrewRecipe as) = sum $ map ibus as
View keybase.md

Keybase proof

I hereby claim:

  • I am iancanderson on github.
  • I am iancanderson (https://keybase.io/iancanderson) on keybase.
  • I have a public key whose fingerprint is 69E6 AE7E 103C CBC2 71E6 CA7E 32F4 63EF B488 C3EB

To claim this, I am signing this object:

View looping_prompt.rb
# User story:
# - user runs ruby tasky.rb
# 1.) print menu
# tasky: "what would you like to do?"
# (n)ew task
# (l)ist tasks
# (c)omplete task
# (q)uit
# 2.) getting input
# user types in 'l', hits enter
@iancanderson
iancanderson / get_foreign_keys.sql
Created Oct 10, 2011
Get foreign key columns names of SQL SERVER tables
View get_foreign_keys.sql
select pk.TABLE_NAME, c.COLUMN_NAME as 'foreign_key'
from INFORMATION_SCHEMA.TABLE_CONSTRAINTS pk ,
INFORMATION_SCHEMA.KEY_COLUMN_USAGE c
where
CONSTRAINT_TYPE = 'PRIMARY KEY'
and c.TABLE_NAME = pk.TABLE_NAME
and c.CONSTRAINT_NAME = pk.CONSTRAINT_NAME
order by pk.TABLE_NAME
View gist:1125393
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEApem8SDIu2VltmxkviH4C2vzh/wTyaX+R8/2vBMcwUDyKRS1in+CZFlV5ustGsxylWCFCGbxBljZUhpdNccLq+cMUaFGL46LU9ooVaNq6q9xtJfwdutdXxpRE4/gzs1IfTXzwNycmheogQx3PkIQZHDK3NqVNYvS6+xOaFYrYF2DAMr1vjRGJe9Yevu5HWXRArqIRX9YoGOCxWLvIE1MczzpoMdD1szXrSTwmPSaPLfnWYYUO2tds5c86qXo+z76WwOWLd2bK532j1xxpsOByjpagIUYY3qtBZT7f6B/SmbL8jbPQNLCvoQJGyxYDaybbijI2Islw5XXE3B8bqz9kow== iananderson@Ian-Andersons-iMac.local
View id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEApem8SDIu2VltmxkviH4C2vzh/wTyaX+R8/2vBMcwUDyKRS1in+CZFlV5ustGsxylWCFCGbxBljZUhpdNccLq+cMUaFGL46LU9ooVaNq6q9xtJfwdutdXxpRE4/gzs1IfTXzwNycmheogQx3PkIQZHDK3NqVNYvS6+xOaFYrYF2DAMr1vjRGJe9Yevu5HWXRArqIRX9YoGOCxWLvIE1MczzpoMdD1szXrSTwmPSaPLfnWYYUO2tds5c86qXo+z76WwOWLd2bK532j1xxpsOByjpagIUYY3qtBZT7f6B/SmbL8jbPQNLCvoQJGyxYDaybbijI2Islw5XXE3B8bqz9kow== iananderson@Ian-Andersons-iMac.local
@iancanderson
iancanderson / rails-wizard-2011-04-12.rb
Created Apr 13, 2011
template for my next rails app underway..
View rails-wizard-2011-04-12.rb
# >---------------------------------------------------------------------------<
#
# _____ _ _ __ ___ _
# | __ \ (_) | \ \ / (_) | |
# | |__) |__ _ _| |___\ \ /\ / / _ ______ _ _ __ __| |
# | _ // _` | | / __|\ \/ \/ / | |_ / _` | '__/ _` |
# | | \ \ (_| | | \__ \ \ /\ / | |/ / (_| | | | (_| |
# |_| \_\__,_|_|_|___/ \/ \/ |_/___\__,_|_| \__,_|
#
# This template was generated by RailsWizard, the amazing and awesome Rails
@iancanderson
iancanderson / jquery.pollForChanges.js
Created Apr 8, 2011
new jquery plugin in progress to support www.pilvinotes.com
View jquery.pollForChanges.js
(function( $ ){
$.fn.pollForChanges = function( interval, changedCallback ) {
// this maps element ids to corresponding values
var _mapIdsToValues = {};
// skip if not a textarea or an text input (for now)
var inputs = this.filter("textarea,input[type='text']");
View Rails 2 Environment
# 2011-03-22
#
# Mac OS X 10.6.3
# Homebrew 0.7
# Xcode 3.2.4
# Git 1.7.3.1
# RVM 1.0.12
# Ruby 1.8.7, 1.9.2
# Passenger 2.2.15
# MySQL 5.1.49
You can’t perform that action at this time.