Skip to content

Instantly share code, notes, and snippets.

View noahlh's full-sized avatar

Noah Lehmann-Haupt noahlh

View GitHub Profile
@noahlh
noahlh / gist:719bc4a74ca25461a6e3
Created December 11, 2015 23:52
New LeadLander + Segment Combined Template Link
https://www.scalyr.com/<insert page here>/?LLM={{contact.primary_email.email}}&ajs_uid={{contact.primary_email.email}}&ajs_event=Email+Click

Keybase proof

I hereby claim:

  • I am noahlh on github.
  • I am nlh (https://keybase.io/nlh) on keybase.
  • I have a public key whose fingerprint is 517C 6E29 696B 6B49 91BC CB62 48F5 C716 D729 1EE1

To claim this, I am signing this object:

@noahlh
noahlh / gist:5724658
Created June 6, 2013 20:29
FullCalendar function to "grey out" days before the current date (it does this by applying the 'fc-other-month' style, which is what is used for dates that appear in another month). Uses the moment.js library to (more easily) manipulate date objects.
$('#calendar').fullCalendar({
// Other Calendar Options go here
viewDisplay: function(view){
$('.fc-day').filter(
function(index){
return moment( $(this).data('date') ).isBefore(moment(),'day')
}).addClass('fc-other-month');
}
})
class GiftCertificatesController < ApplicationController
def show(id=nil)
@gift_certificate = GiftCertificate.find(id || params[:id])
render :show
# render :show, :layout => "gift_certificate"
end
def show_pdf(id=nil)
@gift_certificate = GiftCertificate.find(id || params[:id])
res = render_pdf(@gift_certificate)
@noahlh
noahlh / gist:4151685
Created November 27, 2012 00:50
Heroku output from failed Docverter attempt
2012-11-27T00:34:02+00:00 app[web.1]: Started GET "/gift_certificates/50b3fd673d1e899b06000002/show_pdf" for 173.52.212.67 at 2012-11-27 00:34:02 +0000
2012-11-27T00:34:02+00:00 app[web.1]: <!DOCTYPE html>
2012-11-27T00:34:02+00:00 app[web.1]: <html>
2012-11-27T00:34:02+00:00 app[web.1]: <head>
2012-11-27T00:34:02+00:00 app[web.1]: <title>Gift Certificate</title>
2012-11-27T00:34:02+00:00 app[web.1]: <link href="application-f6845fddd931d22b32088070ba88b779.css" rel="stylesheet" media="print"></link>
2012-11-27T00:34:02+00:00 app[web.1]: </head>
2012-11-27T00:34:02+00:00 app[web.1]: <body>
2012-11-27T00:34:02+00:00 app[web.1]:
2012-11-27T00:34:02+00:00 app[web.1]: <div class='container'>
@noahlh
noahlh / hack.sh
Created April 1, 2012 15:37 — forked from erikh/hack.sh
OSX For Hackers (nlh version)
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#