Skip to content

Instantly share code, notes, and snippets.

View vincentmac's full-sized avatar

Vincent Mac vincentmac

View GitHub Profile
@vincentmac
vincentmac / Preferences.sublime-settings
Last active October 7, 2015 23:41
SublimeText 3 User Preferences
{
"draw_white_space": "all",
"draw_indent_guides": true,
"indent_guide_options": ["draw_normal", "draw_active"],
// "font_face": "Inconsolata",
// "font_size": 14,
"font_face": "DejaVu Sans Mono",
"font_size": 12,
"highlight_line": true,
"ignored_packages":
@vincentmac
vincentmac / ex-largest-day.js
Created August 2, 2012 23:15
js:riak mr example
{
"inputs":"goog",
"query":[
{"map":{
"language":"javascript",
"source":
"function(value, keyData, arg) {
var data = Riak.mapValuesJson(value)[0];
var month = value.key.split('-').slice(0,2).join('-');
var volume = data.Volume;
@vincentmac
vincentmac / Vincent_SublimeCustom.tmTheme
Created July 9, 2012 20:22
sublime: enlightened theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Vincent Mac</string>
<key>name</key>
<string>enlightened</string>
<key>settings</key>
<array>
# ZSH Theme emulating the Fish shell's default prompt.
function prompt_char {
git branch >/dev/null 2>/dev/null && echo '±' && return
hg root >/dev/null 2>/dev/null && echo '☿' && return
echo ':'
#echo '○'
}
local user_color='magenta'; [ $UID -eq 0 ] && user_color='red'
@vincentmac
vincentmac / gist:2299265
Last active January 6, 2023 18:24
Android: Chrome USB Debugging
In terminal type:
adb forward tcp:9222 localabstract:chrome_devtools_remote
Open desktop Chrome and navigate to:
localhost:9222
https://developers.google.com/chrome-developer-tools/docs/remote-debugging
@vincentmac
vincentmac / #!: forever post-receive
Created April 2, 2012 22:38
#!: forever post-receive
#!/bin/sh
GIT_WORK_TREE=/var/www/simplicity.io
export GIT_WORK_TREE
git checkout -f
forever stop 0
NODE_ENV=production forever start /var/www/simplicity.io/app.js