Skip to content

Latest commit

 

History

History
223 lines (171 loc) · 7.64 KB

presentation.adoc

File metadata and controls

223 lines (171 loc) · 7.64 KB

Command line nuts

Command line nuts

Give yourself to the #bash side

Emmanuel Bernard

Data dude at Red Hat
Open Source coder
Mac OS X user

Why on Earth the terminal!?

Slow computer
Snail IO and Apple Mail atrociously slow

Tried to avoid GUI as much as possible
Started living in terminal

Warnings

You will "waste" a lot of time setting this up
Forget (obvious) ROI

More fluid in your workflow
It’s a lot of fun!

Licenses

Use the WTFPL!
Short enough for scripts

# Released under the WTFPL license version 2 http://sam.zoy.org/wtfpl/
#
# Copyright (c) 2014 Emmanuel Bernard

Fundamentals

Terminal

Mac OS X

iTerm 2
Apple Terminal
TotalTerminal

Package installer

Linux: you’re good to go :)
Windows: Cygwin
Mac OS X: brew

brew update
brew upgrade

brew install tmux

Brew list

a2ps apache-opennlp autoconf213 betty a52dec apache-spark autoconf264 bfg aacgain apachetop autoenv bgpq3 aalib ape autogen bgrep aamath apg autojump bib-tool aardvark_shell_utils apgdiff automake bibclean abcde apib automake112 bibtex2html abcl apktool automoc4 bibtexconv abcm2ps apngasm automysqlbackup bibutils abcmidi apollo autopano-sift-c bigdata abduco app-engine-java-sdk autopsy bigloo abnfgen apparix autossh bind abook apple-gcc42 autotrace bindfs ace appledoc20 avce00 binutils aces_container appledoc21 avfs binwalk ack appledoc22 avian bip acme appscale-tools avidemux bison acpica apt-cacher-ng aview bison27 activemq apt-dater avra bitchx activemq-cpp aqbanking avrdude bitlbee admesh arabica avro-c bittwist adns arangodb avro-cpp blahtexml adobe-air-sdk archey avro-tools blazeblogger adplug archivemount awk blink1 advancecomp argp-standalone aws-cfn-tools blitz aescrypt argtable aws-cloudsearch blitzwave aespipe argus aws-elasticache blueutil afflib argus-clients aws-elasticbeanstalk bmake afio argyll-cms aws-sns-cli bmon afsctool aria2 awscli bochs aften arm axel bogofilter afuse arp-scan b43-fwcutter bokken aget arp-sk babeld bonnie++ aggregate arping babl boost aha arpoison backupninja boost-bcp ahcpd arss bacula-fd boost-build aiccu artifactory bagit boost-python aircrack-ng ascii balance boost149 akka asciidoc bam boot2docker alac asciitex bar botan aldo asm6 base64 box2d algol68g asn1c basex boxes align aspcud bash bpm-tools allegro4 aspell bash-completion brag

…​

Tmux

Terminal mutiplexer: like terminal tabs but more powerful

Notion of sessions, windows, pane

Editor

Vim
"It was supposed to be called the Pod
but Steve was getting the hang of Vim"

[action][repetition multiplier]movement
d2f.
delete up to the second dot

Learn your dotfiles

Store them in Git
Get a new machine much faster and consistent

For example .bash_profile .muttrc .vimrc .ssh/config

Automate! Automate! Automate!

Learn bash (or PowerShell)

Automate everything with repeatable steps.
Follow @evilbashtips

Code

IDE

Vim (anything non Ceylon and non Java)
IdeaVim for IntelliJ IDEA
Vrapper for Eclipse

Git

Forget UIs, go command line
Set your own aliases and short cuts
Git custom commands

git-some-command

Tig

"Graphical" UI for Git history and commits
Awesome for surgical commit edits

Backups

rsync is awwwwwsommmmmmme
Forget all other tools
Of course my backups are scripted

You can do time machine like feature

rsync --archive --verbose --one-file-system --hard-links \
    --human-readable --inplace --numeric-ids -F \
    --link-dest="backup/last" "source" "backup/timestamp"

Command line all in

Mutt

Write emails in vim
Truly offline: mutt reads the local copy synced by offlineimap
offlineimap syncs every 10 mins
msmtpq queues sent email until there is network

IRC: Weechat

Weechat: IRC client in text

Conclusion

Invest in your fluidity even at sunken cost
You will feel faster and happier