test 3
try:
from OpenSSL import SSL
except ImportError:
SSL = None
[root@Archie] archlinux.me archlinux.mobi archlinux.org.uk archlinux.us
Archive for the ‘Uncategorized’ Category.
try:
from OpenSSL import SSL
except ImportError:
SSL = None
try: from OpenSSL import SSL except ImportError: SSL = None |
This is pretty easy...but a handy tip none the less. VIM: AutoIndent php/html files. :set ft=phtml gg=G
Just some quick notes, for myself and in case someone else ever wants this. In this day and age, I hate having to setup color on terminals ….colors make things very easy to see, quickly. So here are my notes so i don’t have to go spend time figuring it out yet again lol.
in your .profile or .bashrc
export TERM=xtermc
alias ls=”/usr/gnu/bin/ls -lah –color=auto”
in your .vimrc
syntax on
set showmatch
set bg=dark
set incsearch
set tabstop=4
set shiftwidth=4
set expandtab
set bs=2
bs=2 makes your backspace erase instead of inserting weird chars
syntax=on will enable color
the rest of it is just my personal settins in vim :)
When using open-vmware-tools, I was having the following errors reported every 30 seconds.
Below is how I fixed it.
I simply put the following into a file located at: /etc/release
ArchLinux Kernel 3.x
That stopped the error messages from showing up in /var/log/message.log
At work we have to use Windows … so I’m stuck using mirc, and sometimes when pasting code back and forth, we want to quickly remove the extra data from the front when cutting text/data from the mirc window. It usually has a timestamp and name that need to be removed.
This does the trick quickly. You have to love the simplicity of shell commands. The “cut” command has some nice options that rarely get used, one is to list everything from field X on.. in this example start at the third field and list the rest is shown by “-f 3-”.
#!/usr/bin/bash
# stripmirc – strips fields from mirc copy/paste
# crouse
export TERM=xtermc
timestamp=`date +%T`
tempfile=”/tmp/mirc.$timestamp.tempfile”
touch ${tempfile}
# TRAP for the cleanup routine in case bad stuff happens.
trap cleanup 1 2 3 6
# Function for deleting files not needed.
cleanup ()
{
rm ${tempfile}
}
echo “Type CTRL D to end”
cat > ${tempfile}
echo “”;echo “”;echo “”;
cat ${tempfile} | cut -d” ” -f 3-
rm ${tempfile}
exit 0