(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
var validator = require('validator'); | |
var hankaku = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ '; | |
var zenkaku = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ '; | |
var zenkakuToHankaku = function (word) { | |
for (var i = 0, n = zenkaku.length; i < n; i++) { | |
word = word.replace(new RegExp(zenkaku[i], 'gm'), hankaku[i]); | |
} | |
return word.replace(/^\s+|\s+$/g, ''); // trim head and tail white space | |
}; |
# | |
# A virtual host using mix of IP-, name-, and port-based configuration. | |
# This is based on using Homebrew for OS X. You can use this in other | |
# cases though, but you'll likely need to adjust some of the paths below. | |
# | |
server { | |
# Replace this port with the right one for your requirements | |
# listen 80 [default|default_server]; #could also be 1.2.3.4:80 |
tell application "iTunes" | |
activate | |
set newPreset to make new EQ preset | |
set name of newPreset to "Perfect" | |
set band 1 of newPreset to 3 | |
set band 2 of newPreset to 6 | |
set band 3 of newPreset to 9 | |
set band 4 of newPreset to 7 | |
set band 5 of newPreset to 6 | |
set band 6 of newPreset to 5 |
tell application "iTunes" | |
activate | |
set newPreset to make new EQ preset | |
set name of newPreset to "Eargasm Explosion" | |
set band 1 of newPreset to 3 | |
set band 2 of newPreset to 6 | |
set band 3 of newPreset to 9 | |
set band 4 of newPreset to 7 | |
set band 5 of newPreset to 6 | |
set band 6 of newPreset to 5 |
test.isFalse(v, msg) | |
test.isTrue(v, msg) | |
test.equal(actual, expected, message, not) | |
test.length(obj, len) | |
test.include(s, v) | |
test.isNaN(v, msg) | |
test.isUndefined(v, msg) | |
test.isNotNull | |
test.isNull | |
test.throws(func) |
// common.js ====================================== | |
(function(exports) { | |
// Define all your functions on the exports object | |
exports.foo = function() { | |
return 'bar'; | |
}; | |
})((typeof process === 'undefined' || !process.versions) |
#!/bin/bash | |
# install homebrew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# install homebrew's official php tap | |
brew tap josegonzalez/homebrew-php | |
" ACEJUMP | |
" Based on emacs' AceJump feature (http://www.emacswiki.org/emacs/AceJump). | |
" AceJump based on these Vim plugins: | |
" EasyMotion (http://www.vim.org/scripts/script.php?script_id=3526) | |
" PreciseJump (http://www.vim.org/scripts/script.php?script_id=3437) | |
" Type AJ mapping, followed by a lower or uppercase letter. | |
" All words on the screen starting with that letter will have | |
" their first letters replaced with a sequential character. | |
" Type this character to jump to that word. |
<?php | |
$files = glob("*.tar.gz"); | |
$days = 7; | |
foreach($files as $file) { | |
if(is_file($file) | |
&& time() - filemtime($file) >= $days*24*60*60) { | |
unlink($file); | |
} | |
} |