Skip to content

Instantly share code, notes, and snippets.

View iHiD's full-sized avatar
💙

Jeremy Walker iHiD

💙
View GitHub Profile
@iHiD
iHiD / fixtures.coffee
Last active December 15, 2015 14:59
Ember Stuff.
Meducation.MediaFile.FIXTURES = [
{
id: 8
title: 'Abdominal Ultrasound Tutorial'
description: "A tutorial about how to read an abdominal ultrasound video. Produced to give medical students just a better idea of what to expect."
image_src: "https://d589j1w8ayj7e.cloudfront.net/attachments/media_files/previews/8.jpg"
user: 1
high_quality_url: "http://www.meducation.net/media_files/8/high_quality"
media_type_id: 3
}
@iHiD
iHiD / gist:5230062
Created March 24, 2013 01:34
Rubinius Crash Report
==================================== ERROR ====================================
| An extension is trying to add an invalid handle at the following location: |
| v8_handle.cpp:31 |
| |
| An invalid handle means that it points to an invalid VALUE. This can happen |
| when you haven't initialized the VALUE pointer yet, in which case we |
| suggest either initializing it properly or otherwise first initialize it to |
| NULL if you can only set it to a proper VALUE pointer afterwards. Consider |
| the following example that could cause this problem: |
| |
@iHiD
iHiD / blog_post.rb
Created February 10, 2013 18:31
When the hard work pays off... A complex model, fully integrated into Meducation with basically no thought. Meducation is so easy now-a-days! :)
class BlogPost < ActiveRecord::Base
can_generate_reputation
has_comments
has_views
has_votes
has_news_feed_item
is_a_contribution
is_a_resource
is_cacheable
has_markdown
@iHiD
iHiD / post-commit
Created September 21, 2012 13:47 — forked from consti/post-commit
Take a photo of you, whenever you make a commit
#!/bin/sh
#
# Take a photo of you, whenever you make a commit
#
# This is an improved version of Víctor Martínez original post:
# http://coderwall.com/p/xlatfq
#
# Improvements:
@iHiD
iHiD / New.rb
Created September 11, 2012 16:22
Sketchup
def self.stringify(input)
if input.is_a? String
input.dump
elsif input.is_a? Array
"[" + input.collect{|object| stringify(object)}.join(",") + "]"
elsif input.is_a? Hash
"{" + input.to_a.collect{|key,value| "#{stringify(key)}:#{stringify(value)}"}.join(",") + "}"
elsif input.is_a? Symbol
input.to_s.dump
else
@iHiD
iHiD / spec.md
Created August 27, 2012 20:12
Family Tree

Specification

Models

Person

  • Name
  • Picture
  • DOB
  • DOD
@iHiD
iHiD / post-commit
Created July 30, 2012 15:21 — forked from consti/post-commit
Take a photo of you, whenever you make a commit
#!/bin/sh
#
# Take a photo of you, whenever you make a commit
#
# This is an improved version of Víctor Martínez original post:
# http://coderwall.com/p/xlatfq
#
# Improvements:
@iHiD
iHiD / converter.rb
Created July 3, 2012 12:15
PDF to SVG components
# Set up a couple of paths
lib_directory = "#{Rails.root}/lib/svgs/"
assets_directory = "#{Rails.root}/app/assets/images/pages/"
pdf_path = "/Users/iHiD/Downloads/SightSound.pdf"
(1..18).each do |id|
# Setup image specific paths
orignal_filename = "#{lib_directory}#{id}.svg"
text_filename = "#{assets_directory}#{id}_text.svg"
@iHiD
iHiD / speaker.md
Created June 30, 2012 14:47 — forked from matiaskorhonen/speaker.md
Frozen Rails Talk Proposal Template (http://2012.frozenrails.eu/)
@iHiD
iHiD / config.rb
Created June 26, 2012 01:17
Security Article Part 3 - 15
config.filter_parameters += [:password, :email]