Tuesday, April 29, 2008

Google reader shortcuts

I am tried of forgetting these and then looking for them

j/kitem down/upselects the next/previous item in the list
space/shift-spacepage down/upmoves the page down/up
n/pscan down/upin list view, selects the next item without opening it
oopen/close itemin list view, expands or collapses the selected item
enteropen/close itemin list view, expands or collapses the selected item
stoggle starstars the selected item
shift-stoggle shareshares the selected item
mmark as read/unreadswitches the read state of the selected item
ttag an itemopens the tagging field for the selected item
vview originalopens the original source for this article in a new window
shift-amark all as readmarks all items in the current view as read
1expanded viewdisplays the subscription as expanded items
2list viewdisplays the subscription as a list of headlines
rrefreshrefreshes the unread counts in the navigation
shift-n/pnavigation down/upselects the next/previous subscription or folder in the navigation
shift-xnavigation expand/collapseexpand or collapse a folder selected in the navigation
shift-onavigation open subscriptionopens the item currently selected in the navigation
ghgo to homegoes to the Google Reader homepage
gago to all itemsgoes to the "All items" view
gsgo to starred itemsgoes to the "Starred items" view
gtgo to tagallows you to navigate to a tag by entering the tag name
gugo to subscriptionallows you to navigate to a subscription by entering the subscription name
utoggle full screen modehides and shows the list of subscriptions
?keyboard shortcuts helpdisplays a quick guide to all of Reader's shortcuts

Thursday, April 17, 2008

Backing up Thunderbird

Backup Thunderbird to a backup_directory
tar zcvf /home/username/backup_dir/tbbackup.tar.gz /home/username/.mozilla-thunderbird.

Restoring Thunderbird
*make sure thunderbird is not running*
tar -zxvf /home/username/tbbackup.tar.gz -C /home/username

Credit to:
http://www.cyberciti.biz/faq/linux-backup-thunderbird-email-profile/

Wednesday, March 26, 2008

Mount a Windows share from Ubuntu

How to mount a windows share from ubuntu

# Install smbfs
sudo apt-get install smbfs

# get the UID of the single user, this will be used in editing /etc/fstab
grep $username /etc/passwd | cut -d: -f3
# NOTE $username = the real users login name

# create a file under /home/$username/ named ".smbcredentials" with the following text
username=MyUsername (username could also be username@domain)
password=MyPassword

# protect the .smbcredentials file, because your password is in plain text
sudo chown root .smbcredentials
sudo chmod 600 .smbcredentials

# backup the /etc/fstab
sudo cp /etc/fstab /home/username/backups/

# edit fstab (I used cifs). Make sure its all on 1 line. use the uid you got earlier
//servername/sharename /path/to/mnt cifs credentials=/path/to/.smbcredentials,uid=1000 0 0

# reload fstab
sudo mount -a

Thursday, February 21, 2008

Display Primary and Secondary DNS in Linux

Type the following to display the DNS servers being used by your system

$ cat /etc/resolv.conf

Tuesday, January 15, 2008

Terminal Emulation for Linux

For security and remote administration reasons you can "screen" out of your working terminal and close out of your shell and have access to the working shell remotely and local when you need it. To do this follow the steps below.

Su to root:
$su -
type:
# screen
Now type your commands:
# tshark -i xxxxxxxx
Now hold down the following keys at the same time:
# CTRL + a + d
This detaches the screen and allows you to exit the terminal window.


To access the detached terminal do the following:
From local:
$ su -
# screen -R
This gets you back into the terminal you were working on.

From remote:
ssh to the server
$ su -
#screen -R
You will she your command still running.


Thanks to scm for showing me this.

Monday, December 24, 2007

Set date and time on linux

To change the date and time from a command line type the following:

sudo date -s "24 DEC 2007 9:00:00"

The format is "day MONTH year time"

Monday, October 29, 2007

tshark filter example

Here is a way to capture traffic with tshark and only get what the display filter is showing.

tshark -i 2 -f "port 110" -R "pop.request.parameter conatins "user"" > c:\port110.txt
*********************try "pop.request.command conatins "USER""*************

This will capture all port 110 traffic and filter out the "user" command line and save it to a txt file.

tshark -i 2 -f "port 25" -R "smtp.rsp.parameter contains "Sender"" > c:\port25.txt

This is an example of how to capture traffic on your outbound smtp server.

-i = interface
-f = capture filter
-R= display filter