Skip to content

Instantly share code, notes, and snippets.

View gist:711418
require 'rubygems'
require 'yaml'
require 'rest-client'
require 'rails'
module Seat
# store default database as well as auth credentials in yaml file
CONFIG = YAML::load_file('config.yaml')
View .bash_profile PS1
export PS1="\[\e[1;30m\]\$\[\e[m\] "
sausman / gist:3360630
Created Aug 15, 2012
Sublime Text 2 prefs
View gist:3360630
"color_scheme": "Packages/Color Scheme - Default/sausman.tmTheme",
"draw_indent_guides": true,
"ensure_newline_at_eof_on_save": true,
"font_face": "Menlo",
"font_size": 14.0,
"highlight_modified_tabs": true,
"tab_size": 2,
"theme": "Soda Dark.sublime-theme",
"translate_tabs_to_spaces": true,
View gist:3360637
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>Eric JK</string>
<!-- based on -->
View gist:4629516
AuthType Basic
AuthUserFile .htpasswd
AuthName "Members Area"
Require valid-user
sausman / layout.html
Last active Dec 18, 2015
WhipUps Default Theme
View layout.html
<!DOCTYPE html>
<title>{{#if title}}{{title}} - {{/if}}{{name}}</title>
<meta charset="utf-8">
{{#if avatar}}<link rel="icon" type="image/png" href="{{avatar_url}}">{{/if}}
<meta name="viewport" content="initial-scale=1, minimum-scale=1, maximum-scale=1">
<link rel="alternate" type="application/atom xml" title="Atom Feed" href="http://{{domain}}/feed">
<link href=',700italic,400,700' rel='stylesheet' type='text/css'>
<link href=',700' rel='stylesheet' type='text/css'>
sausman / archive.json
Last active Dec 18, 2015
Example WhipUps Handlebars data by action name.
View archive.json
"action": "archive",
"archive": {
"utc": "2013-06-01 00:00:00 UTC",
"timestamp": 1370044800,
"year": 2013,
"month": 6,
"month_padded": "06",
"month_name": "June",
"month_name_abbr": "Jun",
View gist:7933760
<%def name="body()">
Hey Flunker! Your classes have been active while you&rsquo;ve been gone. Files have
been uploaded, students have helped other students. Get back to the
community, they&rsquo;re waiting for you.
-c<span style="color: red">F</span>
View gist:b9c2563acd0a0b4b96b0
// Store $('body') and $('.mainMenu') in variables outside of the event handler
// This way they only need to be looked up once and not on every click
var $body = $('body');
var $mainMenu = $(".mainMenu");
// Since you're only checking the className you can use `hasClass` here instead of `is`
if ( $("js-menuToggle") ) {
sausman / CyaSS.jsx
Created Feb 21, 2015
CyaSS React Component - mimic :hover and :active with inline styles
View CyaSS.jsx
import React from "react/addons";
import m from "./m";
export default class CyaSS extends React.Component {
constructor() {
this.state = {
hover: false,
active: false