The Command Line
Adam - published author, speaker, co-founder of SeaGL
notes by James Zeringue ([email protected])
Thank you blug/btc for hosting!
The command line is a great place to leverage other's knowledge and hard work, which they have already shared!
at, rename, locate
Highly customizable automation at the tip of your fingers.
The Command line as a tank, which is given away for free:
"Save your money! Take one of our free tanks!"
Station wagon buyer "i don;t know how to maintain a tank!"
"volunteers will fix it for you for free while you sleep!"
Buyer: "stay away from our home!!"
CMD j dotfiles (change dir and list contents)
Ctrl-r Reverse interactve command history search
SHELL fish friendly interactive shell
fish automatically lists completion possibilities
auotmagic syntax highligting on the command line
advanced tab-completion with list of possible matches w/ descriptions
CMD alt-. argument history, repeat to go back
globs groups of files expanded by the shell
watch run multiple commands and monitor their output at intervals
highlights changed output in the commands
dirjump (j) maintains index of visited paths, then performs a smart autocomplete when using j command
"What is the difference between python and shell version?"
A: The shell is an interactive programming language, while python is more of a programming langunage.
cmd locate find files by index (always uses pre-cached index, contrast with find which reads filenames in real-time)
cmd pv progress meter (see pipes)
cmd progress detects and monitors interesting commands and monitors
cmd toilet (colorful banners in the console)
cmd nmap find hosts on network, much more
* masscan has Adam's favorite README on github ( https://github.com/robertdavidgraham/masscan )
text editor, standard in any *nix system
enhanced status line capabilities
tight integration with git
Syntastic enables inline error checking on save with line highlighting
folds - hide/show information in sections
'snippets' - "ultisnips+youcompleteme"
templated auto complete and code snippet plugins
(xkcd about vim users spending time editting vimrc files)
HOWTO - make this environment portable?
automate it! host all dotfiles and rcfiles and download them on-demand
check github for a management solution
tmux terminal multiplexer
sits between you and the command line
allows multiple connections to the same terminal for collaboration
You should VERSION-CONTROL your plaintext!
no matter how much ram you have, swap can increase performance by allowing unused anonymous memory to be paged out, thereby increasing your maximum effective RAM
Found via this post on Hacker News, where the poster raises the point that some filesystem buffers might be extremely “hot” (frequently used), but might only fit in physical RAM (where they should be) if some swap space is available to page out other “cold” information.
I run “web tests” on a remote server. I use Selenium to act like a person interacting with a website, viewing and entering data. Selenium is pretty awesome, it can drive a real web browser like Firefox.
Even better is to have these web tests run automatically every time I commit code. I use Jenkins for this. Jenkins even fires up a headless desktop so Selenium can run Firefox.
When a web test breaks (especially in some way I can’t reproduce on my local desktop), sometimes it helps to actually see what Jenkins sees as it runs the test. Here’s a quick guide for doing so on an Ubuntu GNU/Linux server.
Connect to the remote server using SSH. Install VNC server:
sudoapt-get install vnc4-server
On the remote server, become the user tests run as. For example:
sudosu - ci
Set a password for the VNC server using the vncpasswd command.
Start headless X server by running vncserver. Note the given display. If example.com:1 is included in the output of vncserver, the display is :1.
Figure out which port the VNC server is using. I usually do something like
Based on this review I bought a Logitech QuickCam Pro 9000. I ignored all the red tape and “Run The Installer First!” warnings on the packaging, and plugged it in to my Ubuntu 8.04 laptop. And it worked immediately. Yay! Skype, Cheese, both work. Video sharing via Flash (like for Dimdim) doesn’t work, so no extra credit, yet. :)