most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat| var util = require('util') | |
| function hook_stdout(callback) { | |
| var old_write = process.stdout.write | |
| process.stdout.write = (function(write) { | |
| return function(string, encoding, fd) { | |
| write.apply(process.stdout, arguments) | |
| callback(string, encoding, fd) | |
| } |
| // | |
| // This server will start a bash shell and expose it | |
| // over socket.io to a browser. See ./term.html for the | |
| // client side. | |
| // | |
| // You should probably: | |
| // | |
| // npm install socket.io | |
| // curl -O https://github.com/LearnBoost/Socket.IO/raw/master/socket.io.min.js | |
| // |
| function encrypt(text){ | |
| var cipher = crypto.createCipher('aes-256-cbc','d6F3Efeq') | |
| var crypted = cipher.update(text,'utf8','hex') | |
| crypted += cipher.final('hex'); | |
| return crypted; | |
| } | |
| function decrypt(text){ | |
| var decipher = crypto.createDecipher('aes-256-cbc','d6F3Efeq') | |
| var dec = decipher.update(text,'hex','utf8') |
| <?php | |
| /** | |
| * Customize Event Query using Post Meta | |
| * | |
| * @author Bill Erickson | |
| * @link http://www.billerickson.net/customize-the-wordpress-query/ | |
| * @param object $query data | |
| * | |
| */ |
| function slugify(text) | |
| { | |
| return text.toString().toLowerCase() | |
| .replace(/\s+/g, '-') // Replace spaces with - | |
| .replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
| .replace(/\-\-+/g, '-') // Replace multiple - with single - | |
| .replace(/^-+/, '') // Trim - from start of text | |
| .replace(/-+$/, ''); // Trim - from end of text | |
| } |
| on run | |
| tell application "Finder" | |
| try | |
| activate | |
| set frontWin to folder of front window as string | |
| set frontWinPath to (get POSIX path of frontWin) | |
| tell application "Terminal" | |
| activate | |
| tell application "System Events" | |
| keystroke "`" using {control down} -- bring down visor |
| { | |
| "name": "your-app-name", | |
| "version": "0.0.1", | |
| "private": true, | |
| "dependencies": { | |
| "http-proxy": "0.8.x", | |
| "connect": "2.3.x" | |
| } | |
| } |
| # source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list | |
| # A list of available STUN server. | |
| stun.l.google.com:19302 | |
| stun1.l.google.com:19302 | |
| stun2.l.google.com:19302 | |
| stun3.l.google.com:19302 | |
| stun4.l.google.com:19302 | |
| stun01.sipphone.com | |
| stun.ekiga.net |