As configured in my dotfiles.
start new:
tmux
start new with session name:
| #!/bin/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| <?php | |
| function longest_common_substring($words) | |
| { | |
| $words = array_map('strtolower', array_map('trim', $words)); | |
| $sort_by_strlen = create_function('$a, $b', 'if (strlen($a) == strlen($b)) { return strcmp($a, $b); } return (strlen($a) < strlen($b)) ? -1 : 1;'); | |
| usort($words, $sort_by_strlen); | |
| // We have to assume that each string has something in common with the first | |
| // string (post sort), we just need to figure out what the longest common | |
| // string is. If any string DOES NOT have something in common with the first | |
| // string, return false. |