Skip to content

Instantly share code, notes, and snippets.

View chrishoage's full-sized avatar

Christopher Hoage chrishoage

View GitHub Profile
@chrishoage
chrishoage / inline add for Chosen.js
Created April 3, 2012 09:35
Add Item inline for Chosen
$("form").bind("liszt:ready", function(event, chosen) {
var chooseInstance = chosen.chosen,
$chosenDrop = $(chooseInstance.search_results).parent();
var $addHtml = $("<div/>", {
html: $("<input/>", {
type: "text",
keypress: function(e) {
if(e.which == 13) {
e.preventDefault();
var $this = $(this),
Backbone.Marionette.TemplateCache.prototype.loadTemplate = function(templateId){
// load your template here, returning a the data needed for the compileTemplate
// function. For example, you have a function that creates templates based on the
// value of templateId
if (Handlebars.templates === undefined || Handlebars.templates[templateId] === undefined) {
var deffered = $.ajax({
url : '/templates/' + templateId + '.handlebars',
dataType : 'text',
success : function(data) {
if (Handlebars.templates === undefined) {
@chrishoage
chrishoage / index.html
Created September 9, 2015 19:50
CE Code Challenge
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Creative Engineering Code Challenge - July 2015</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
@chrishoage
chrishoage / kwm.1s.sh
Last active February 9, 2016 20:11
kwm BitBar script
#!/bin/bash
kwmc=$HOME/bin/kwmc
currentFocus=$($kwmc read focus)
currentMouse=$($kwmc read mouse-follows)
tag=$($kwmc read tag)
if [ "$1" = 'quit' ]; then
killall kwm
import Foundation
import AppKit
func parseFrame(args: Array<String>) -> NSRect {
var frameHash = [String: Int]()
frameHash["w"] = 0
frameHash["h"] = 0
frameHash["x"] = 0
frameHash["y"] = 0
#!/bin/bash
kwmc=$HOME/bin/kwmc
currentFocus=$($kwmc query focus-follows-mouse)
currentMouse=$($kwmc query mouse-follows-focus)
tag=$($kwmc query space active mode)
if [ "$1" = 'quit' ]; then
killall kwm
{
"plugins": [
"stylelint-order"
],
"rules": {
"color-hex-case": "lower",
"color-hex-length": "short",
"color-named": "never",
"color-no-invalid-hex": true,
"font-family-name-quotes": "always-unless-keyword",
@chrishoage
chrishoage / keybase-proof.md
Created November 28, 2017 04:09
Keybase.io Proof

Keybase proof

I hereby claim:

  • I am chrishoage on github.
  • I am chrishoage (https://keybase.io/chrishoage) on keybase.
  • I have a public key ASDAjKt3BXXaK8YhBcS9KNVE17eCpPmpXgEP5YfgEeok7Ao

To claim this, I am signing this object: