Skip to content

Instantly share code, notes, and snippets.

Add Sublime Text to OS X Context Menu

  • Open Automator
  • Create a new Service
  • Add a Run Shell Script action
  • Set input to Service receives selected files or folders in any application
  • Set the script action to /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n $@
  • Set Pass input to as arguments
  • Save as Open in Sublime Text
@vanslambrouckd
vanslambrouckd / .vimrc
Created December 11, 2015 16:44 — forked from JeffreyWay/.vimrc
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@vanslambrouckd
vanslambrouckd / iterm2-solarized.md
Created November 19, 2015 21:54 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OSX)

Solarized

<?php
/**
* An helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.0.16 on 2015-03-16.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
@vanslambrouckd
vanslambrouckd / gistbook.json
Last active August 29, 2015 14:12
Anonymous Gistbook
{"title":"Anonymous Gistbook","author":"vanslambrouckd","pages":[{"pageName":"","sections":[{"type":"javascript","source":"var test = 'david';\nalert('test');"},{"type":"text","source":"Welcome to Gistbook!"},{"type":"html","source":"<html>\n <body>\n jfdlksqjflkdqsjflqdks\n </body>\n</html>"}]}],"public":true}
@vanslambrouckd
vanslambrouckd / gist:cfdb2e8cd12822745192
Created December 19, 2014 09:59
marionette.js layout vs region
Regions are areas taht will remain displayed (semi-) permanently as the user navigates (example: nav menu)
Layouts: behave like views, but in addition have areas where you can display subviews.
Layouts are meant to disappear when a user navigates somewhere else and that view is no longer necessary
@vanslambrouckd
vanslambrouckd / gist:75c59d24100e14ae53b9
Created December 19, 2014 08:47
modal region question
https://github.com/vanslambrouckd/marionette_test/blob/master/js/region_modal.js
<div class="ui modal" id="modal-region">
<i class="close icon"></i>
<div class="header">
<%= title %>
</div>
<div class="content">
<div class="ui medium image">
<img src="/images/avatar/large/chris.jpg">
from: http://stackoverflow.com/questions/9329446/how-to-do-for-each-over-an-array-in-javascript
For Actual Arrays
(See "For Array-Like Objects" below for array-like objects.)
You currently have three options and will soon have two more:
Use forEach and related (ES5+)
Use a simple for loop
zsh (oh-my-zsh)
antigen (manage shell scripts)
solarized theme
http://www.bash2zsh.com/zsh_refcard/refcard.pdf
http://grml.org/zsh/zsh-lovers.html