This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define ["backbone", "underscore"], (Backbone, _) -> | |
# BaseView | |
# -------- | |
class BaseView extends Backbone.View | |
# Optional delegate to implement delegation pattern: | |
# @delegate.getMonkeyCollection() | |
delegate: null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LazyCollection extends Backbone.Collection | |
indexQuerystring: 'index' | |
index: 1 | |
lastLength: 0 | |
fetch: (options) -> | |
options or= {} | |
if options.reset | |
@index = 1 | |
@lastLength = 0 | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// guide.js | |
// ======== | |
// Description of this file. | |
// In case of AMD | |
define( | |
['jquery', 'underscore', 'EventEmitter', 'AnotherClass'], | |
function($, _, EventEmitter, AnotherClass) { | |
"use strict"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enable TRIM on non-Apple SSDs in OS X 10.8.2 Mountain Lion. | |
WARNING: This is ONLY tested on 10.8.2, and NOT earlier or later versions. YMMV. | |
Technical note: The driver changed in 10.8.2 and similar perl commands that worked in earlier OS X versions did not work for me once I updated to 10.8.2. | |
Run the following commands in Terminal… | |
1. Backup the original driver |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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.052 0.489 0.482 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>Menlo-Bold - 11.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> | |
<string>0.432 0.325 0.276 1</string> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#js boiler for buzz | |
snippet buzzjs | |
/*jshint undef:true, forin:false, eqeqeq:true, browser:true, newcap:true */ | |
/*global console:true, $:true */ | |
(function (global) { // We always pass global here | |
var bm = global.bm, | |
_ = bm.util; | |
})(this); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jshint undef:true, forin:false, eqeqeq:true, browser:true, newcap:true */ | |
/*global console:true, $:true */ | |
(function (global) { // We always pass global here | |
// Note: at the top of the file, we define things we are going to use more | |
// often in this file, like you would with CommonJS require or Python imports | |
var bm = global.bm, | |
_ = bm.util, | |
EventEmitter = global.EventEmitter2, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ////////////////////////////// | |
" # vim settings | |
" ////////////////////////////// | |
set nocompatible | |
syntax enable | |
filetype plugin on | |
" be able to switch buffers without saving | |
set hidden | |
" no backups or swaps needed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Global maildrop filter file | |
DEFAULT="$HOME/MailDir" | |
AUTOREPLYFILE="$HOME/AutoReply" | |
HASAUTOREPLY=`test -e $AUTOREPLYFILE && echo YES` | |
# If the Spam-Flag is set, move the mail to the Junk folder | |
if (/^X-Spam-Flag:.*YES/) | |
{ |
NewerOlder