Introduced to this years ago by a colleague, but it's still my favorite little alias.

#Add to ~/.bashrc  
alias psg='ps aux | grep -v grep | grep -i'  
#Source the updated bashrc(or relog)  
source ~/.bashrc  
#I prefer to not be case sensitive, example:  
[jpyth@arch-jpyth ~]$ psg fire  
jpyth 16131 12.7 3.7 1463388 607748 ? Sl Mar25 367:33
[jpyth@arch-jpyth ~]$ psg FiRe  
jpyth 16131 12.7 3.7 1463388 607748 ? Sl Mar25 367:33
[jpyth@arch-jpyth ~]$
more ...

Configuring irssi


#server section of ~/.irssi/config  
servers = (  
address = "$hostname";  
chatnet = "IRCnet";  
port = "6667";  
autoconnect = "true";  
password = "$user:$pass";  

irssi logging:

#Create directory for logs  
#Large storage drive == /storage/  
sudo ln -s /storage/irssi /var/log/  
#You'll probably want to own these files or atleast rw access.  
chown -R $owner:$group /storage/irrsi  
#in irssi run:  
/SET autolog ON  
/SET autolog_path /var/log/irssi/$tag/$0.log  


#Contents of /etc/logrotate.d/irssi  
/var/log/irssi/*/*log {  

irssi-libnotify-git from Arch User Repository (AUR):

#For xfce4  
sudo pacman -S xfce4-notifyd  
#Get package from AUR  
Extract && cd  
tar -xvf irssi-libnotify-git.tar.gz  
cd irssi-libnotify-git  
#create package - Install missing deps  
makepkg || {  
#missing deps  
sudo pacman -S python2-gobject perl-html-parser  
#install final package  
sudo pacman -U irssi-libnotify-git*.pkg.tar.xz  
#create directories if missing && symlink installed script for irssi
to use.  
mkdir -p ~/.irssi/scripts/autorun && ln -s
/usr/share/irssi/scripts/notify.pl ~/.irssi/scripts/autorun/  
#dep for notify-listener.py  
sudo pacman -S python2-dbus  
#start listener -- I do this when launching irc. You could start it
with systemd/init too.  
nohup notify-listener.py &

Simple script to grab current or start a new irssi:


notify=\`which notify-listener.py\`  
irc=\`which irssi\`

ps aux | grep "$notify" | grep -v grep &>/dev/null || {  
nohup $notify &  
ps aux | grep -i "$irc" | grep -v grep &>/dev/null || {  
screen -S $screenN $irc  
} && {  
screen -list | grep "$screenN" | wc -l | grep "\^1$" &>/dev/null &&
screen -D $screenN  
screen -R $screenN  
} || {  
echo "You has too many/few irssis, check screen"  


more ...


A self taught, constantly learning geek living the dream in Silicon Valley.

The majority of configuration content on this site will come from either Arch or CentOS, though concepts should apply to nearly any Linux system.

more ...