Skip to content

Instantly share code, notes, and snippets.

View kristoferjoseph's full-sized avatar
🐘
💨

kj kristoferjoseph

🐘
💨
View GitHub Profile
@kristoferjoseph
kristoferjoseph / Monokai.dvtcolortheme
Created March 4, 2012 18:33
Molokai theme for XCode4
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0.995968 0.995968 0.995968 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>Consolas-Bold - 12.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0.995968 0.995968 0.995968 1</string>
@kristoferjoseph
kristoferjoseph / dam.theme
Created October 24, 2012 16:46
dam theme for zsh
local last_command_status="%(?,%{$fg[green]%}✔%{$reset_color%},%{$fg[red]%}✘%{$reset_color%})"
PROMPT='%{$fg_bold[grey]%}%~ %(1j.%j.)
${last_command_status} %{$reset_color%}'
RPROMPT='$(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX=""
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[cyan]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
@kristoferjoseph
kristoferjoseph / timelinejs_git_log
Created November 25, 2012 22:18
git log output format for timeline.js
git log --reverse --date=short --pretty=format:'{%n "headline": "%H",%n "author": "%an <%ae>",%n "startDate": "%ad",%n "text": "%s "%n},' > ~/Desktop/json_log.txt
@kristoferjoseph
kristoferjoseph / csscomb.php
Last active April 24, 2020 05:48
This is the csscomb file that adheres to twitter recess property order. You can use this to automatically order your css properties to pass recess lint settings.
<?php
/**
* CSScomb
*
* Tool for sorting CSS properties in specific order
*
* @version 2.12 (build e784736-1301040046)
* @author Vyacheslav Oliyanchuk (miripiruni) <mail@csscomb.com>
* @license MIT
* @web http://csscomb.com/
@kristoferjoseph
kristoferjoseph / .vimrc
Created April 2, 2013 16:57
Copy of my hand tuned .vimrc file
"PATHOGEN
execute pathogen#infect()
call pathogen#helptags()
call pathogen#runtime_append_all_bundles()
"RELOAD VIMRC
nmap <silent> <leader>sv :so $MYVIMRC<CR>
nmap <silent> <leader>ev :e $MYVIMRC<CR>
"LEADER
@kristoferjoseph
kristoferjoseph / Gruntfile.js
Created April 20, 2013 17:48
Kitchen sink PhoneGap grunt script. Has livereload, mocha, stylus, jade, jshint etc.
/*global module:false, require:false*/
var path = require('path'),
lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var folderMount = function folderMount(connect, point) {
return connect.static(path.resolve(point));
};
module.exports = function(grunt) {
@kristoferjoseph
kristoferjoseph / modularity.js
Last active December 20, 2015 10:09
Example of a Require.js Common.js style module that expose an API to the application. Similar to how Reflow does it.
define(function (require, exports, module) {
'use strict';
//Requires
var EventMap = require('modules/utils/eventmap'),
FontModel = require('modules/fonts/models/fontmodel'),
FontView = require('modules/fonts/views/fontview'),
fontModel = new FontModel(),
fontView;
@kristoferjoseph
kristoferjoseph / Originator.js
Last active December 20, 2015 11:09
Backbone Memento Example
createMemento: function (hash) {
var memento = new Memento({
originator: this,
state: this.changedAttributes(hash)
});
return memento;
},
//Sets a memento object to restore state.
@kristoferjoseph
kristoferjoseph / filterablecollection.js
Last active March 1, 2018 09:20
Example Filterable Collection
// Collection of filter functions
filters: new Backbone.Collection(),
// Temporary collection used to apply the filters to
tempCollection: new Backbone.Collection(),
// Filter function for sub string in property
stringInPropertyFilterFunction: function (prop, str) {
return function (model) {
var lowerCaseProp = model.get(prop).toLowerCase();
@kristoferjoseph
kristoferjoseph / gridtest.js
Created July 31, 2013 11:21
Example of Squire and Sinon set up
var injector = new Squire();
module("Grid", {
setup: function () {
injector.mock({
"modules/utils/eventmap": {
subscribe: sinon.stub()
},
"modules/grid/models/gridmodel": sinon.stub().returns(Backbone.Model),
"modules/grid/views/gridview": sinon.stub().returns(Backbone.View)