here's a few random ones i have:
Create your own short user name:
Code:
#!/usr/bin/env python
from random import choice
# Vowels
vowels = ['a','e','i','o','u']
# Beginning hard consonants
startcons = ['b','c','d','g','j','k','m','n','p','q','t','v','x','z']
# Ending hard consonoants
endcons = ['b','c','d','g','k','m','n','p','t','x','z']
# Soft Consonants -- note v and z are listed twice
softcons = ['f','h','l','r','s','v','w','z']
print choice(startcons) + choice(vowels) + choice(softcons) + choice(endcons)
merge your multiple firefox bookmarks [in html] to one central big one:
Code:
#!/bin/bash
# by Tom Law, September 2003
# "ub" = "Unique Bookmarks"
# Compare two bookmark files, and create for each one a new html file
# that contains the bookmarks unique to the other one.
# You'll need to edit the following two lines to show where
# the two existing bookmark files (that you want to compare) are.
BA="/home/keyshawn2/august 18 2004 bookmarks -win.html"
BB="/home/keyshawn2/august 18 2004 bookmarks-linux.html"
#################################
# sort each bookmark file, while removing extra spaces,
# and adding a browser identifier (I put the identifier
# at the end of the title to help with debugging.)
cd /tmp
sort -b $BA | sed -e 's/<\/A>/---A<\/A>/g' | sed -e 's/ */ /g' > utmpA
sort -b $BB | sed -e 's/<\/A>/---B<\/A>/g' | sed -e 's/ */ /g' > utmpB
# merge the two files, while removing duplicate lines,
# as well as unwanted lines and characters
sort -bd utmpA utmpB | uniq -uW 2 | grep HREF | grep -vE "(about:config|>---|N---A|N---B|uniqA|uniqB)" | sed s/\<DT\>//g | sed s/$/\<br\>/g > utmpC
# split the merged file back into two, while removing the identifiers
cat utmpC | grep -e ---A | sed -e 's/---A//g'> utmpA
cat utmpC | grep -e ---B | sed -e 's/---B//g'> utmpB
# convert them into html files
echo "<html><body>" > uhead
echo "</body></html>" > utail
cat uhead utmpA utail > uniqA.html
cat uhead utmpB utail > uniqB.html
rm utmpA utmpB utmpC uhead utail
# After running this command, load the "/tmp/uniq?.html" files
# into their respective browsers (file A into browser B,
# and file B into browser A), and drag each link to somewhere
# in the bookmark file. It doesn't matter if you put them
# in different folders than you did in the other bookmark file.
# Run ub at bootup or by cron, and then every day or so look at
# the "uniq" file (which you should bookmark) in each browser, and
# update the browser's bookmark file.
detect how much space is your drive taking up and where:
Code:
for dirs in `ls /`
do
if [ -d /$dirs ]
then
echo "Listing of /$dirs" >> /tmp/disk_usage.txt
echo "################################" >> /tmp/disk_usage.txt
du -h /$dirs >> /tmp/disk_usage.txt
echo "" >> /tmp/disk_usage.txt
fi
done