Skip to content

Instantly share code, notes, and snippets.

View cmcculloh's full-sized avatar

Christopher McCulloh cmcculloh

View GitHub Profile
@cmcculloh
cmcculloh / SublimeText KeyBindings
Last active December 20, 2015 06:49
SublimeText KeyBindings
[
{
"keys": ["ctrl+alt+shift+f"], "command": "js_format",
"context": [{"key": "selector", "operator": "equal", "operand": "source.js,source.json"}]
}
]
@cmcculloh
cmcculloh / application-type.js
Last active December 13, 2015 19:18
Nearly finished Wizard Layout
define(function (require) {
var Marionette = require('backbone.marionette');
var $ = require('jquery');
var _ = require('underscore');
require('fuelux/all');
return Marionette.ItemView.extend({
template: require('tmpl!templates/wizard/appType.html'),
tagName:'div',
className: 'container',
@cmcculloh
cmcculloh / gist:3982834
Created October 30, 2012 20:34
Example of what I need for marionette triggers to be able to do
return Marionette.Layout.extend({
triggers: {
'click .editable': 'view:edit',
},
initialize: function(){
this.bindTo(this, 'view:edit', this.edit, this);
},
edit: function(ev){
@cmcculloh
cmcculloh / mybot.js
Created October 18, 2012 23:04 — forked from adamzr/mybot.js
My first node.js IRC bot
//
// My First IRC Bot
//
console.log("Bot Started...");
var irc = require('irc');
//For storing globals
var MYBOT = {};
//Channel to use
@cmcculloh
cmcculloh / gist:3719497
Created September 14, 2012 02:43
refactored slider code
//SPOTLIGHT SLIDER LAYOUT 3
jQuery("#slider3 > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", <?php echo $con_spotlight_duration; ?>000, false);
var rotateHoverHandler = {
hoveredOver: false,
stopSlider: false,
isRotating: true,
hoverOver: function(){
jQuery("#slider3 > ul").tabs("rotate", null, false);
@cmcculloh
cmcculloh / Preferences.sublime-settings
Last active September 29, 2016 20:48
My sublime text settings
{
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme",
"copy_with_empty_selection": false,
"draw_minimap_border": true,
"draw_white_space": "all",
"file_exclude_patterns":
[
"*.class",
@cmcculloh
cmcculloh / gist:3143923
Created July 19, 2012 13:31 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@cmcculloh
cmcculloh / dynodeGetBatchItem.js
Created April 26, 2012 20:26
dynode getBatchItem example
var events = {
options: null,
getEventsList: function(){
console.log('events.getEvents() private: got here');
var opts = {
Limit: 15
};
dynode.query("event_types_timestamp", "Viewed Product", opts, events.getEventDetails);
},
@cmcculloh
cmcculloh / gist:1585461
Created January 9, 2012 22:55
weird push behaviour
$ commit "got the array passing to work (finally, OMG this was ridiculous)" -a
####################################################################################
Committing changes to branch: `menu`
####################################################################################
Checking status...
------------------------------------------------------------------------------------
$ git status
@cmcculloh
cmcculloh / gist:1585261
Created January 9, 2012 22:15
weird new script behaviour
master
$ new menu
####################################################################################
Creating new branch: `menu`
####################################################################################