Skip to content

Instantly share code, notes, and snippets.

View seanhagen's full-sized avatar
:shipit:
coding

Sean Hagen seanhagen

:shipit:
coding
  • Flight Center Travel Group
  • Vancouver, British Columbia
  • 16:53 (UTC -07:00)
View GitHub Profile
@cowboy
cowboy / gist:379255
Created April 26, 2010 12:20 — forked from remy/gist:378764
Just another way of doing it...
// "Cheat" special event using this pattern:
// http://benalman.com/news/2010/03/jquery-special-events/#pattern
//
// Also see:
// http://benalman.com/news/2010/03/jquery-special-events/#add-and-remove-tripleclick-per-handler
(function($){
$.event.special.cheat = {
setup: function() {
@budu
budu / player.clj
Created July 11, 2010 22:42
A simple (headless) MP3 player written in Clojure using the clj-audio library.
(ns player
(:use clj-audio.core
clj-audio.sampled)
(:import javax.sound.sampled.SourceDataLine
java.io.File))
;;;; playlist
(def music-file-extensions ["mp3"])
@salex
salex / jekyll_uv_highlight.rb
Created July 18, 2010 12:53
Jekyll Plugin for Ultraviolet
module Jekyll
class UltravioletTag < Liquid::Block
require "Uv"
# This defines an uvhighlight tag for code highlighting using Ultraviolet (must [sudo] gem install ultraviolet and dependancies)
# Syntax for tag is {% uvhighlight code [theme] ["linenumb|linenos"]%} which is similar to the pygments call
# code is required, theme and linenumb optional and in any order
def initialize(tag_name, arg, tokens)
super
copy_files? # copy css files if not in css directory
@imathis
imathis / gist_tag.rb
Created June 15, 2011 17:58 — forked from chrisjacob/gist_tag.rb
A Liquid tag for Jekyll sites that allows embedding Gists and showing code for non-JavaScript enabled browsers and readers.
require 'cgi'
require 'digest/md5'
require 'net/https'
require 'uri'
module Jekyll
class GistTag < Liquid::Tag
def initialize(tag_name, text, token)
super
@text = text
@malarkey
malarkey / Contract Killer 3.md
Last active May 8, 2024 16:02
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@benagricola
benagricola / hiera.yaml
Created May 1, 2013 12:04
Profiles and Roles with Hiera / Puppet 3
---
:backends:
- yaml
- gpg
:gpg:
:datadir: '/etc/puppet/hiera'
:yaml:
:datadir: '/etc/puppet/hiera'
@zachleat
zachleat / reading_time.rb
Last active October 21, 2020 23:00
Read this in X minutes Liquid Filter Plugin (for Jekyll)
# Outputs the reading time
# Read this in “about 4 minutes”
# Put into your _plugins dir in your Jekyll site
# Usage: Read this in about {{ page.content | reading_time }}
module ReadingTimeFilter
def reading_time( input )
words_per_minute = 180
Sample project for the "Getting started with JavaFX in Clojure" ( https://coderwall.com/p/4yjy1a ) ProTip.
@michaelfairley
michaelfairley / stuff.md
Last active June 11, 2017 21:02
Makin' Games with Ruby
(setq enh-ruby-program "/home/gnufied/.rbenv/versions/1.9.3-p448/bin/ruby")
(autoload 'enh-ruby-mode "enh-ruby-mode" "Major mode for ruby files" t)
(add-to-list 'auto-mode-alist '("\\.rb$" . enh-ruby-mode))
(add-to-list 'auto-mode-alist '("\\.rake$" . enh-ruby-mode))
(add-to-list 'auto-mode-alist '("Rakefile$" . enh-ruby-mode))
(add-to-list 'auto-mode-alist '("\\.gemspec$" . enh-ruby-mode))
(add-to-list 'auto-mode-alist '("\\.ru$" . enh-ruby-mode))
(add-to-list 'auto-mode-alist '("Gemfile$" . enh-ruby-mode))
(add-to-list 'interpreter-mode-alist '("ruby" . enh-ruby-mode))