Skip to content

Instantly share code, notes, and snippets.

View tdreyno's full-sized avatar

Thomas Reynolds tdreyno

  • Portland, OR
  • 14:25 (UTC -07:00)
View GitHub Profile
@tdreyno
tdreyno / imager.rb
Created June 22, 2012 00:14 — forked from sts/imager.rb
Middleman Imager
require 'base64'
require 'RMagick'
include Magick
module Imager
class << self
def registered(app)
app.send :include, InstanceMethods
app.ready do
=color-mixer($color-name, $color-hex)
$color-name: $color-hex
$color-name + Light: lighten($color-name, 8%)
$color-name + Lighter: lighten($color-name, 16%)
$color-name + Dark: darken($color-name, 8%)
$color-name + Dark: darken($color-name, 16%)
$purple
+color-mixer($purple, #a2385d)
/////
/ YAML: data/some_stuff.yml
/
/ awesome_stuff:
/ - title: Awesome Stuff #1
/ author: Danny Palmer
/ content_tag: a-s-1
/
/ - title: Awesome Stuff #2
/ author: Danny Palmer2
<script type="text/javascript">
$(document).ready(function() {
var dropdownW = $('ul.dropdown').prev('a.dropdown').innerWidth();
$('ul.dropdown').width(dropdownW);
$('a.dropdown').bind('click touchend', function(e) {
var dropdown = $(this).next('ul.dropdown')
if (!dropdown.is(':visible'))
{
dropdown.show();
@tdreyno
tdreyno / equivs.txt
Created September 12, 2011 00:51 — forked from jeremyckahn/equivs.txt
Equivalent JS and CoffeeScript functions?
getSpeedySignature: (ofString) ->
sum = 0
for i in [0..ofString.length]
sum += ofString.charCodeAt(i)
sum
<script type="text/javascript" charset="utf-8">
/* Creat a div shell variable to house the screenshot. We will be creating this and destroying this every time you click on a thumbnail link */
var $tempDiv = $('<div id="screenshot" class="popup">' +
'<a class="close pngfix"></a>' +
'<div></div>' +
'</div>');
/* No touchy */
/* This will lightbox_me the tempDiv declared above, and fill it with the image */
function loadImage() {