-
Download [jshint.vim][jshint]
-
Put it in
~/.vim/plugin/jshint.vim
-
Edit your local vimrc file (I'm on macvim with janus, so it's at
~/.gvimrc.local
) and add:au BufWritePost *.js :JSHint
-
Read the [vim docs][vim] and particularly [auto commands][auto] I'm a newb and the neckbeards are probably laughing at me for even posting this.
This file contains 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
var EventEmitter = require('events').EventEmitter; | |
var mergeInto = require('react/lib/mergeInto'); | |
module.exports = createStore; | |
function createStore(initialState) { | |
var events = new EventEmitter(); | |
var state = initialState || {}; | |
return { |
This file contains 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
;(function(){ | |
function typeOf(item){ | |
if (item._family) return item._family(); | |
return typeof item; | |
} | |
Array.prototype._family = function(){ return 'array'; }; | |
var _ = this._ = function(obj){ |
This file contains 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
<?php | |
$arr = array( | |
'Color' => array('Red', 'Blue'), | |
'Size' => array('Regular', 'Large'), | |
'Material' => array('Metalic', 'Nylon') | |
); | |
function magic_algorithm($arr){ | |
function cartesian_product($arrays) { |
This file contains 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
!function () { | |
var channels = {}; | |
this.subscribe = function (channel, subscription) { | |
if (!channels[channel]) channels[channel] = []; | |
channels[channel].push(subscription); | |
}; | |
this.publish = function (channel) { | |
if (!channels[channel]) return; |
This file contains 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
#!/bin/bash | |
open "https://gerrit.instructure.com/#q,$(git log --grep='^Change-Id: ' -1|\ | |
grep 'Change-Id: '|head -n 1|sed 's/Change-Id://'|sed 's/ //g'),n,z" |
This file contains 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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains 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
" ------------------------------------------------------------------ | |
" Filename: christmas.vim | |
" Last Modified: Nov, 29 2011 | |
" Version: 1 | |
" Maintainer: Nobody, jacked from SM Smithfield (m_smithfield AT yahoo DOT com)'s Marklar | |
" Copyright: 2006 SM Smithfield | |
" This script is free software; you can redistribute it and/or | |
" modify it under the terms of the GNU General Public License as | |
" published by the Free Software Foundation; either version 2 of | |
" the License, or (at your option) any later version. |
This file contains 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
var get = Ember.get, set = Ember.set, doc = document; | |
var FastSelectComponent = Ember.Component.extend({ | |
items: null, | |
valuePath: 'value', | |
labelPath: 'label', | |
value: null, | |
selected: null, | |
tagName: 'select', |
OlderNewer