Tuesday, March 16, 2010
Sunday, September 27, 2009
Audacious themes
[ Linux | Audacious | Themes | Skins ]
You can use winamp themes with Audacious,
just download and unzip into /usr/share/audacious/Skins/
(You may have to create a folder for the theme first)
You can use winamp themes with Audacious,
just download and unzip into /usr/share/audacious/Skins/
(You may have to create a folder for the theme first)
Tuesday, September 8, 2009
fix ssh known_hosts
#!/bin/bash
if [ $# -ne 1 ]
then
echo "Usage: $0 line"
exit
fi
line=$1
tmp=tmp_$RANDOM
sed $line'd' ~/.ssh/known_hosts > $tmp
mv $tmp ~/.ssh/known_hosts
Sunday, May 31, 2009
color prompt
# Define colors for readability
black="\[\033[0;30;49m\]"
blackgrey="\[\033[30;47m\]"
red="\[\033[1;31;49m\]"
green="\[\033[32;49m\]"
yellow="\[\033[33;49m\]"
blue="\[\033[1;34;49m\]"
magenta="\[\033[35;49m\]"
cyan="\[\033[36;49m\]"
white="\[\033[37;49m\]"
r_color="\[\033[0m\]" # Reset color
clr="\[\033[K\]" # Clear to the end of the line
if [ ${UID} -eq 0 ]; then
user="$red\u$r_color"
else
user="$blue\u$r_color"
fi
PS1="$user@\h:\w\$ "
Tuesday, May 26, 2009
Cursor movement
#!/bin/bash
# Cursor movement
function cycle {
i=30
while [ $i -le 36 ] ;
do
if [ ! $i == 33 ];
then
echo -e "$i \033[1;${i}m $i \033[1A"
sleep .3
fi
let i=i+1
done
}
t=0
while [ $t -le 3 ];
do
cycle
echo -e "\033[0m \033[1A"
let t=t+1
done
Sunday, May 10, 2009
Follow Linux kernel development with git
1. Install git. Some dists have it in repos, there are packages at http://git-scm.com/download
2. Run
Now you have the latest snapshot + revision history back to 2.6.12-rc2 which you can update with
Check for updates on http://kernel.org/ or just
I put this line in my crontab:
Ref:
http://kernel.org/
http://www.kernel.org/doc/local/git-quick.html
2. Run
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.gitNow you have the latest snapshot + revision history back to 2.6.12-rc2 which you can update with
git pull (My linux-2.6 folder is 778MB)Check for updates on http://kernel.org/ or just
finger @git.kernel.orgI put this line in my crontab:
01 16 * * * cd /files/Public/linux-2.6; /usr/bin/git pullRef:
http://kernel.org/
http://www.kernel.org/doc/local/git-quick.html
Monday, April 20, 2009
bash script, spaces in filenames
Delete all mp3s. Don't ask why...
List disk usage for all items in a dir
This is easier done with
but it's the usage of "while read" I wanted to show.
find . -name '*.mp3' |while read FILE; do rm "$FILE"; done
List disk usage for all items in a dir
ls |while read i; do du -sh "$i"; done
This is easier done with
du -sh *
but it's the usage of "while read" I wanted to show.
Subscribe to:
Posts (Atom)

