Skip to content

Instantly share code, notes, and snippets.

View seejohnrun's full-sized avatar
🤗
Writing codes

John Crepezzi seejohnrun

🤗
Writing codes
View GitHub Profile
@seejohnrun
seejohnrun / array_partition.php
Created March 13, 2013 15:57
This should really just be part of PHP
<?php
// implementation
function array_partition($arr, $callable) {
$r = array(array(), array());
foreach ($arr as $e) {
$r[$callable($e) ? 0 : 1][] = $e;
}
return $r;
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a