Thursday, July 16, 2009

Moved!

Moved to http://sudoers.org

Saturday, February 16, 2008

git post

I've been messing around with git lately and here are some notes

git init-db - initializes the repo
git add . - Adds file to repo
git commit -a -m "message" - commit to repo
git clone --bare projecname .git - makes a clone of the repo
git push - pushes it to the bare repo (can be done remotely)
git pull - updates the repo

Friday, June 22, 2007

grep goodness

So as a sys admin I find myself looking at logs most of the time. And with the volume and size of our mail logs its handy to know some nifty tricks about grepping logs and such. Here is one good trick I learned

tail -f <log file > | grep <thing you want to search for >


So what tail -f does is it will output the tail of the log file, and the -f switch will not stop the tail but instead it will keep the log file open which means you can watch logs happen in real time. And then you pipe it to grep which search for the thing you want to search for. Easy? I know its a life helps me do my job a little easier :)

Saturday, February 17, 2007

muttrc

Just wanted to put up a sample muttrc file that i use, for those of you who don't know what mutt is, mutt is a text based email reader. Anyway here is my muttrc file

# Written by Ed Lim
# muttrc file

# Define the = shortcut, and the entry point for the folder browser (c?)
set folder="~/mail/"
set hostname=whateveryourhostnameis.com # Name of our local host.
set hidden_host # Hide host details.
set ssl_starttls=yes

# headers
set edit_headers
ignore *
unignore Subject: Date: From: Reply-To: To: CC: BCC: X-Mailer: User-Agent:

# In this order
unhdr_order *
hdr_order From: To: Reply-To: CC: BCC: Date: Subject: X-Mailer: User-Agent:

# writing email
set editor="vim +':set textwidth=77' +':set wrap' +\`awk '/^$/ {print i+2; exit} {i++}' %s\` %s"
set ispell="aspell -e -c" #spell checker

#----- Client behaviour --------
set copy # Save a copy of sent mail
set record="=sent-mail" # saves sent mail to sent folger
set postponed="=saved-messages"
set delete=ask-yes # Ask before doing a delete.
set include=yes # Include the message in replies.
set indent_str="> " # set quotemark to 1 byte
set forward_format="Fw: %s" # subject in forwarded messages
set sort_aux=date-received # Sort threads by date received.
set abort_nosubject=no # Abort, if message has no subject.
set abort_unmodified=yes # Abort, if message wasn't edited.
set mime_forward=ask-no # use MIME when forwarding mails.
set move=no # Move mail-spool to $mbox?
set postpone=ask-yes # ask for postponing when doing an Abort.
set print=ask-yes # ask whether you really want to print.
set quit=ask-yes # ask before quitting.
set recall=no # ask for using postponed message.
set reply_to=yes # Use or ignore Reply-To.
set pager_stop # Stop at the end of a message
set pager_index_lines=10
set timeout=60 # time in seconds, till Mutt looks for new mail
set mail_check=3 # time (in seconds) how often buffy checks for new mail
set nomark_old # dont mark old messages old
set alias_file="~/.mutt/aliases"
unset mark_old

source ~/.mutt/colors
source ~/.mutt/mailboxes # Define the list of folders that receive mail.
source ~/.mutt/autoview # Define auto views
source ~/.mutt/aliases # alias file

alternative_order text/plain text/enriched text/html

Anyway enjoy :)

Monday, January 1, 2007

Unix Tip

Here is a good tip i learned a couple of days ago. If you are in the command line and you are using the command less like this
less filename
It will print out the content of the file on to the screen but if you hit 'v' it will bring you to your favorite editor so that you can edit your file

Monday, December 25, 2006

Mutt and Exchange - Solved

Recently i posted an entry about how some mails from mutt was going to the junkmail folder of an exchange account. That issue has now been solved, turns out it was a problem with the smtp servers on campus

This issue is now fixed although i do not know specifically how it was done. So my bad if i blamed exchange for this, although i have no idea why this would be an issue for the exchange servers. But then again there are many things that are weird when it comes to microsoft

Friday, December 15, 2006

New Job

So i got myself a new job. I am now working for the Network Engineering department on campus, and my new job spec will be to help implement, document and deploy WPA enterprise across campus.

WPA is a type of wireless encryption and the whole campus will be moving to using that, and i will be helping to deploy it out. Wish me luck!