wpadminbar vs godsyn.com

I play around with wordpress nightlies because I like living on the edge, breaking my own site, and fixing buggy code. Recently, in the latest nightly release wordpress decided I need an administration bar along the top of my pages. This only displays when logged in, but destroyed my theme. I do not know the official name of this bar, but it has an ID of “wpadminbar”. After seeking plug-ins and settings to no avail and being let down by google, I turned to grep. The resolution is simple. To remove the bar, open wp-settings.php and comment out the following line:

require( ABSPATH . WPINC . '/admin-bar.php' );


//require( ABSPATH . WPINC . '/admin-bar.php' );

Note: If you know of an official way to disable “wpadminbar” or make it more theme friendly, please share.

WD20EARS 4096 HDD vs fdisk

Western Digital GreenHaving purchased a new WD20EARS 4096 (2 terabyte hard drive) I was anxious to put the new beast in my home server, format the drive, and get to moving files around.
so I sudo fdisk -l /dev/sdc as I normally do..
Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdc doesn’t contain a valid partition table[/cc]
I tore everything apart, ensured the bios would handle the drive, and exhausted seemingly every resource.. until I found that these drives no longer start at sector 63.. they start at sector 64.
http://wiki.ubuntuforums.org/showthread.php?t=1456251 — Thanks guys.

syn@synserv:~$ sudo fdisk -u /dev/sdc

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x962f53fb.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won’t be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It’s strongly recommended to
switch off the mode (command ‘c’).

Command (m for help): n
Command action
e extended
p primary partition (1-4)

Partition number (1-4): 1

First sector (63-3907029167, default 63): 64
Last sector, +sectors or +size{K,M,G} (64-3907029167, default 3907029167):

Using default value 3907029167

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.[/cc]
Then just mkfs.ext4 and mount.

Bash script to show WAN and LAN network IPs.

Following is a bash script I wrote to show my lan and wan IPs.
The script will loop every 10 seconds. Seeing as my ISP has a less than desirable up time, I use this to see when I’m finally reconnected.

#  -/oss+:`  `-/o/.
#     `-omMmy+.  +Md/
#        -MMMMMNdhMMMyos+:
#  odo::NMMMMMM/`s-MMMMMMmMMds/
# -.  `NMMMMMMMd+- -ooo/-..-oNM-   `++ /+`++  //
#     +MMMMMMMMMMMMmhyssss-  `-     .ddh. mdd/yy
#     sMm`oMMMMMMMMMMMMMMNmdy+`      -M.  m+`sMy
#     .M/  `+hNMMMMMMMMMMMMMMMMs`    `.`  .`  ..
#      /`     `.:+oo..-/yMMMMMMMN-
#        -+yo:`          +MMMMMMMN`
#     :yNMN+so  -so`     :hyMMMMMM/
#   /mMMMMMMMNhdMN`   ://+hMMMMMNN:
# hMmm-   /osMMMNosNMMMMMMMMdNM+
#`Ms`/  ..-smMNs.oNNho+/++:` sM/
# h/    `:++/- -my-           +s`
#  .          .s`
echo "Press ctrl-c to exit at any time."
while [ 1 ]; do
	WAN_ip_addr=`wget --timeout=10 --tries=2 -qO - http://cfaj.freeshell.org/ipaddr.cgi`
	LAN_ip_addr=`ifconfig | grep 'inet addr:'| grep -v '' | cut -d: -f2 | awk '{ print $1}'`
	echo $(date)
	echo -ne "External IP: "
	if [ -z $WAN_ip_addr ]; then
		echo -e "Disconnected"
		echo -e $WAN_ip_addr
	echo -ne "Internal IP: "
	if [ -z $LAN_ip_addr ]; then
		echo -e "Disconnected"
		echo -e $LAN_ip_addr
	if [ -n "$WAN_ip_addr" ]; then
		echo "Found external IP"
		exit 0
exit 0

PS3: Laws? pfft!

“It only does everything.”
Not any more. In a rather bold move by Sony, they have removed the “Other OS” feature from their console with the latest update of their firmware.

I’m not happy about it, as it was a selling point in my purchase. Now a feature I bought has been removed, and I have to comply with the removal should I wish to play games. I’m not alone in the disgust. Continue reading