Posts tagged linux
Technically, this is a
bash cheat sheet; however, many of the commands will work with Bourne shell descendants, such as
It was like pulling teeth to figure out a way to clear the screen in tmux, such as
CMD+K does in Terminal.app and iTerm. Add this line to your
tmux.conf. It Just Works™:
bind -n C-k send-keys -R \; send-keys C-l \; clear-history
Since switching to
vim, I've found myself really enjoying keyboard-based user interfaces. So instead of managing multiple terminal sessions in iTerm, I have started using tmux. I'm writing this cheat sheet as I learn. Check back often.
If you ssh into servers, you must set up a
.ssh/config file. It will allow you to type
ssh myd instead of
ssh firstname.lastname@example.org -i ~/.ssh/mykey.pem -p 1234.
After 9 years of TextMate, I'm switching to
vim. I'm writing this cheat sheet as I learn. Check back often.
On Linux, Postfix's main configuration file,
main.cf, is located at:
I wanted to export my Safari Reading List on OS X, so I wrote some code to do it. I leveraged Ruby, but this methodology could be easily ported to other languages like Bash, Python, or Objective C.
In the ruby file:
#!/usr/bin/env ruby puts 'Hello world'
At the command line:
chmod +x ruby.rb
Then you can execute it like this: