A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
const fullAlphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; | |
const restrictedAlphabet = 'BCDFGHJKLMNPQRSTVWXZbcdfghjklmnpqrstvwxz'; | |
const threadPrefix = 'thread-'; | |
const messagePrefix = 'msg-'; | |
const isWhitespace = str => /^[\s\xa0]*$/.test(str); | |
const isInvalidString = str => str ? (str.indexOf(threadPrefix) !== -1 || str.indexOf(messagePrefix) !== -1) : false; | |
const encode = function(str) { | |
if (isWhitespace(str)) return str; |
; how to write scripts: http://www.autohotkey.com/docs/ | |
#IfWinActive ahk_class CabinetWClass ; File Explorer | |
^Backspace:: | |
#IfWinActive ahk_class Progman ; Desktop | |
^Backspace:: | |
#IfWinActive ahk_class Notepad | |
^Backspace:: | |
Send ^+{Left}{Backspace} | |
#IfWinActive |
var flattenObject = function(ob) { | |
var toReturn = {}; | |
for (var i in ob) { | |
if (!ob.hasOwnProperty(i)) continue; | |
if ((typeof ob[i]) == 'object') { | |
var flatObject = flattenObject(ob[i]); | |
for (var x in flatObject) { | |
if (!flatObject.hasOwnProperty(x)) continue; |