Archive for the ‘Linux’ Category

no more ptys error on a Gentoo VPS 0

When starting screen, I would get a no more ptys error. I’ve had this error on Gentoo virtual servers run on both OpenVZ and Xen. After some quick googling, I came across the following fix.
echo 8192 > /proc/sys/kernel/pty/max
chmod 666 /dev/pty*
Voila!

lowerttls.sh 0

This script will lower the TTL on a directory full of zone files. I’ve used this with much success on many cPanel servers. I’m not sure how well it would work with other systems. My guess would be that it would work fine on any system using bind.
#!/bin/bash
echo Backing up /var/named
mkdir /home/named.backup
rsync -aq —exclude=proc [...]

m4a2mp3.sh 0

My buddy rips and encodes his CDs with the AAC codec. This proves to be an issue if your mp3 player doesn’t support .m4a’s. Here’s a nice script to convert the m4a’s to mp3 using for loops and faad. You will need to install faad if you do not already have it installed.
#!/bin/bash
#
# Dump [...]

Bash Prompt 0

I created this prompt to match my irssi theme ski. Below are the parts necessary to have your own just like it. Insert this into your .bashrc and then source ~/.bashrc
# Color Variables for Prompt
GRAD1=‘\333\262\261\260′
GRAD2=‘\260\261\262\333′
YLOBRN=‘\[\033[01;33;43m\]‘
WHTBRN=‘\[\033[01;37;43m\]‘
REDBRN=‘\[\033[00;31;43m\]‘
REDBLK=‘\[\033[00;31;40m\]‘
PPLBLK=‘\[\033[01;35;40m\]‘
WHTBLK=‘\[\033[01;37;40m\]‘
CYNBLK=‘\[\033[01;36;40m\]‘
NONE=‘\[\033[00m\]‘
HBLK=‘\[\033[00;30;30m\]‘
HBLU=‘\[\033[01;34;34m\]‘
BLU=‘\[\033[00;34;34m\]‘
YEL=‘\[\033[00;33;33m\]‘
WHT=‘\[\033[01;37;37m\]‘
PRPL=‘\[\033[00;34;35m\]‘
RED=‘\[\033[01;31;31m\]‘
NORM=‘\[\033[01;00;0m\]‘
Prompt PS1=‘\n‘$CYNBLK‘['$NONE'\u'$PPLBLK'@'$NONE'\h'$WHT':'$HBLU'\W'$CYNBLK']‘$NONE‘ ‘

ANSI Color Codes 0

Black 0;30 Dark Gray 1;30
Blue 0;34 Light Blue 1;34
Green 0;32 Light Green 1;32
Cyan [...]