View ExtractProperty.vim
function! ExtractProperty()
let a_save = @a
let properties_file = expand('%:r').'.properties'
if filereadable(properties_file)
normal! gv"ay
let value = @a
let key = substitute(value, ".*", "\\U\\0", "")
let key = substitute(key, '\W\+', "_", "g")
if len(key) > 20
# -*- coding: utf-8 -*-
import sublime, sublime_plugin
import tempfile, subprocess, collections
IS_OSX = sublime.platform() == 'osx'
settings = sublime.load_settings('SpotsManager.sublime-settings')
View chart-pie-from-zsh_history.rb
#!/usr/bin/env ruby
# coding: UTF-8
require 'pathname'
require 'googlecharts'
file = 'zsh_history'
dates = {}
file.each_line do |line|
next unless line =~ /^: /
View Gemfile
# A sample Gemfile
source ""
gem "sinatra"
gem "mongoid"
gem "bson_ext"
gem 'sinatra-reloader'
gem 'haml'
Function::patch = (binding, fn) ->
unless fn
fn = binding
binding = @
wrapped = (args...) ->
args.unshift (args...) ->
wrapped.previous.apply binding, args
fn.apply binding, args
wrapped.previous = @
View plot-graphviz.rb
#!/usr/bin/env ruby
# coding: UTF-8
require 'yaml'
text: '/vendor/requirejs-text/text',
jquery: '/vendor/jquery/dist/jquery',
dust: '/vendor/dustjs-linkedin/dist/dust-full',
dustHelpers: '/vendor/dustjs-linkedin-helpers/dist/dust-helpers',
pagejs: '/vendor/page.js/page',


  • iPhone
  • Yosemite OSX
  • opencv


  1. Attach your iphone to your mac
  2. Open QuickTime and start a New Movie Recording
#!/usr/bin/env coffee
coffeeWalk = (category, id) ->
category.selected = is id
for subcategory in category.subcategories
coffeeWalk subcategory, id
category.selected or= subcategory.selected
# var coffeeWalk = function(category, id) {
# var i = 0, subcategories = category.subcategories, len = subcategories.length, subcategory;
View gitgutter.patch
diff --git a/autoload/gitgutter/utility.vim b/autoload/gitgutter/utility.vim
index cecc887..62512d4 100644
--- a/autoload/gitgutter/utility.vim
+++ b/autoload/gitgutter/utility.vim
@@ -124,7 +124,15 @@ function! gitgutter#utility#file_relative_to_repo_root()
function! gitgutter#utility#command_in_directory_of_file(cmd)
- return 'cd ' . gitgutter#utility#shellescape(gitgutter#utility#directory_of_file()) . ' && ' . a:cmd
+ let cmd = 'cd ' . gitgutter#utility#shellescape(expand('%:p:h')) . ' && ' . a:cmd
View check-style-ejs.rb
# coding: UTF-8
require 'nokogiri'
require 'tempfile'
require 'json'
VALID_NODE_NAMES = %w[title a abbr acronym address applet area article aside audio b base basefont bdi bdo bgsound big blink blockquote body br button canvas caption center cite code col colgroup command data datalist dd del details dfn dir div dl dt em embed fieldset figcaption figure font footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins isindex kbd keygen label legend li link listing main map mark marquee menu meta meter nav nobr noframes noscript object ol optgroup option output p param plaintext pre progress q rp rt ruby s samp script section select small source spacer span strike strong style sub summary sup table tbody td textarea tfoot th thead time title tr track tt u ul var video wbr xmp]
class TidyHTML
class << self
def scan glob