Started new and improved diary file. Now in markdown format!
A good UNIX date string (used for my TextMate diary now macro):
date +"# %A 0%Y-%m-%d at %r"
Generating a md5 hash in Python
>>> import hashlib
>>> import random
>>> hashlib.sha1(str(random.random())).hexdigest()
RegEx: "search for lines that do NOT start with a dollar sign":
^(?!\$).+
Just do pip install python-memcached and you should be good.
As for installing memcached itself, it depends on the platform you are on.
- Windows - http://pureform.wordpress.com/2008/01/10/installing-memcache-on-windows-for-php/
- OS X -
brew install memcached - Debian/Ubuntu -
sudo apt-get install memcached - On OS X/Linux, just run
memcachedin the command line.
Get the Memory of a machine....
Solaris
dmesg | grep memprtdiag | grep Memoryprtconf -v | grep Memory
AIX
bootinfo -rlsattr -E1 sys0 -a realmemgetconf REAL_MEMORY
HPUX
dmesg | grep Physical/opt/ignite/bin/print_manifest | grep Memorymachinfo | grep Memory
Linux
dmesg | grep Memorygrep -i memtotal /proc/meminfofree
OpenVMS
show mem /page
FreeBSD
dmesg | grep memorygrep memory /var/run/dmesg.bootsysctl -a | grep mem