Skip to content

Instantly share code, notes, and snippets.

Avatar

Kent Safranski ksafranski

View GitHub Profile
@ksafranski
ksafranski / deploy.js
Created May 20, 2014
Deploy to multiple environments on Nodejitsu with the same application
View deploy.js
// Nodejitsu multiple environment deploy
//
// Prerequisits:
// Jitsu deploy CLI
//
// Usage:
// Include this file in root of project along with configured
// jitsu_conf.json file
// Run by calling:
// node deploy [ENV]
@ksafranski
ksafranski / Router.js
Last active Jun 15, 2020
Simple hash-based router with :params and 404
View Router.js
// Router object
var Router = function () {
var self = this;
// Watch hashchange
window.onhashchange = function () {
self.process();
};
// Run on load
View model_validation.js
var validate = function (data, model, cb) {
var failures = [];
var regEx;
var validJSON;
var processNode;
var result;
var traverseNodes;
// Define common regular expressions
@ksafranski
ksafranski / jquery.autocomplete.js
Created Aug 9, 2012
Simple jQuery Autocomplete plugin
View jquery.autocomplete.js
/*
*
* Simple Autocomplete Plugin
* @author - Kent Safranski - http://www.fluidbyte.net
*
* HTML:
* --------------------------------------------------------------------
* <input class="autocomplete" data-src="path/to/processor.php" />
*
* CSS:
@tsabat
tsabat / zsh.md
Last active May 28, 2022
Getting oh-my-zsh to work in Ubuntu
View zsh.md
@nathansmith
nathansmith / config.rb
Created Aug 29, 2011
Example config.rb file for Compass
View config.rb
preferred_syntax = :sass
http_path = '/'
css_dir = 'assets/stylesheets'
sass_dir = 'assets/sass'
images_dir = 'assets/images'
javascripts_dir = 'assets/javascripts'
relative_assets = true
line_comments = true
# output_style = :compressed