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
  • 17:15 (UTC -07:00)
View GitHub Profile
select
start_at AT TIME ZONE 'UTC' AT TIME ZONE 'America/Vancouver'
from
appointments
where
date(start_at AT TIME ZONE 'UTC' AT TIME ZONE 'America/Vancouver') = '2014-07-24';
@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() {
@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'
@michaelfairley
michaelfairley / stuff.md
Last active June 11, 2017 21:02
Makin' Games with Ruby
@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
(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))
Sample project for the "Getting started with JavaFX in Clojure" ( https://coderwall.com/p/4yjy1a ) ProTip.
@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
#!/bin/sh
SEP=
SEPE=
CLOCK=⌚
CALENDAR=☼
MUSIC=♫
WIDTH=${1}
@arnested
arnested / README.md
Last active July 5, 2022 13:30
Using Font Awesome in the Emacs mode line

Font Awesome icons in Emacs mode-line

I installed Font Awesome and uses it to make my Emacs mode line look cool:

  • Use the align-left icon for auto-fill-mode.
  • Use the thumbs-up and thumbs-down icons for flymake status (we need to reimplement flymake-report-status to make this happen).
  • Use the tags icon for gtags-mode.

Requirements: diminish.el - I installed it from MELPA.