Huh, who knew this existed:
cat <some-verbose-output> | fold -70
-
fold -sfolds at whitespace -
Also look at the
fmtcommand, which seems similar to emacs’fill-paragraph. -
prgives a pretty display with margins, headers, and page numbers.
Huh, who knew this existed:
cat <some-verbose-output> | fold -70
fold -s folds at whitespace
fmt command, which seems similar to emacs’
fill-paragraph.
pr gives a pretty display with margins, headers, and page numbers.
Put something like this in your ~/.gitconfig:
[includeIf "gitdir:~/work/"]
path = ~/.gitconfig.work
[includeIf "gitdir:~/code/"]
path = ~/.gitconfig.personal
If your work repos are in ~/work, you can have a separate user/email etc for
repos in that folder.
-I and change request type with -X. e.g.
curl -I -X DELETE http://localhost/blah
-H:
curl --header "X-MyHeader: 123" www.google.com
-l-k
-d:
curl -X POST --header "Content-Type: application/json" -d '{"test": true}' http://localhost/blah
find . -ctime -3 # created in the past 3 daysfind . -ctime +3 # older than 3 daysfind . -ctime 3 # created exactly 3 days backfind . -ctime +3 -ctime -5 # created 3 – 5 days backfind . -newer /tmp/somefile # see somefile’s timestamp and show files newer than ittouch 0607090016 /tmp/somefile #i.e. 7th june, 9:00 am, 2016find . -maxdepth 1 -type d -ctime +38 -exec rm -rf {} \; delete all folders older than 38 days back.C-a V or C-a | split the screen verticallyC-a X remove/detach the current splitC-a S split horizontallyC-a tab cycle between windowsCtrl-b % (Split the window vertically)Ctrl-b : “split-window” (Split window horizontally)Ctrl-b o (Goto next pane)Ctrl-b q (Show pane numbers, when the numbers show up type the key to goto that pane)Ctrl-b { (Move the current pane left)Ctrl-b } (Move the current pane right)And here’s my .tmux.conf
set -g prefix C-a
unbind C-b
bind C-a send-prefix
set -g default-terminal "xterm-256color"
set -g history-limit 10000
set -g set-titles-string "#T"
unbind %
bind | split-window -h
bind - split-window -v
sudo /usr/sbin/lsof | grep deleted
If you don’t have lsof, just use this:
find /proc/*/fd -ls | grep '(deleted)'