Skip to content

Instantly share code, notes, and snippets.

View marcelbeumer's full-sized avatar

Marcel Beumer marcelbeumer

View GitHub Profile
@marcelbeumer
marcelbeumer / maildroprc
Created August 2, 2011 22:25
maildrop/mailbot autoreply setup
# 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/)
{
" //////////////////////////////
" # vim settings
" //////////////////////////////
set nocompatible
syntax enable
filetype plugin on
" be able to switch buffers without saving
set hidden
" no backups or swaps needed
@marcelbeumer
marcelbeumer / guide.js
Created April 3, 2012 11:58
Buzz JS guide
/*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,
#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);
<?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>
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
@marcelbeumer
marcelbeumer / guide.js
Last active December 16, 2015 01:30
JavaScript Coding Guidelines
// guide.js
// ========
// Description of this file.
// In case of AMD
define(
['jquery', 'underscore', 'EventEmitter', 'AnotherClass'],
function($, _, EventEmitter, AnotherClass) {
"use strict";
class LazyCollection extends Backbone.Collection
indexQuerystring: 'index'
index: 1
lastLength: 0
fetch: (options) ->
options or= {}
if options.reset
@index = 1
@lastLength = 0
else
@marcelbeumer
marcelbeumer / BaseView.coffee
Last active December 16, 2015 13:49
Backbone BaseView
define ["backbone", "underscore"], (Backbone, _) ->
# BaseView
# --------
class BaseView extends Backbone.View
# Optional delegate to implement delegation pattern:
# @delegate.getMonkeyCollection()
delegate: null
@marcelbeumer
marcelbeumer / gist:5652379
Created May 26, 2013 10:34
Clear tmux pane with ctrl-k (like cmd-k clears a terminal) without polluting the bash history.
:bind-key -n C-k send-keys "clear && tmux clear-history; history -d $((\$HISTCMD-1))" \; send-keys "Enter"