By the default wordpress does not have support for changing the exact font, therefore copying and pasting a text made in Open Office or MS Word often places in the Post or Page wp edit fonts different from the default one set for articles. Hence some articles after being published on a wordpress blog show up with improper font and the only way to fix that is to change the font first in Open Office and then copy back to wordpress instead of simply being able to change the font from within the wordpress article.
To get around this problem, there is a nice plugin fckeditor-for-wordpress-plugin which aids wordpress with an awesome Word like edit functionalities. , downhload location for FCKEdit for WordPress is here
Here is a screenshot of the extra nice functionality the FCKEditor for wordpress providces.
Installing the plugin is like installing any other wordpress plugin and comes easily to:
debian:/~# cd /var/www/blog/wp-content/plugins
debian:/plugins# wget http://downloads.wordpress.org/plugin/fckeditor-for-wordpress-plugin.3.3.1.zip
...
debian:/plugins# unzip fckeditor-for-wordpress-plugin.3.3.1.zip
...
debian:/plugins# cd fckeditor-for-wordpress-plugin/
And further enabling the plugin from:
Plugins -> Inactive -> (Dean's FCKEditor For WordPress) Enable
fckeditor for wordpress will replace the default wordpress editor TinyMCE straight after being enabled. I’ve done also a mirror of the current version as of time of writting of this article, one can download the fckeditor for wordpress mirrored here Now really file editting inside wordpress admin panel is way easier and convenient 😉 Cheers
The Return Path variable on one of the qmail mail servers I manage was improperly set. New newsletter mails initiated by the php scripts on the mail server had the improper return path set in the mail headers, like so:
Return-Path: <anonymous@mail.mymailserver.com>
Therefore many mail servers dropped messages as the set Return Path variable in the headers was incorrectly set to the domain mail.mymailserver.com
Thus to change the Return Path to the correct one that should have been mymailserver.com I had to include mymailserver.com in qmail’s control file /var/qmail/control/bouncehost, e.g.
The classical way to keep a process running in background after log out of a shell is using screen Anyways using screen is not the only way to detach a running process , GNU / Linux and BSDs (Free, Open, Net BSDs) had a command nohup which aim is to run a command immune to hangups, with output to a non-tty
Let’s say one wants to keep track (log) constantly ICMP traffic to a certain host with ping command on a UNIX server / desktop which doesn’t have the screen manager … terminal emulation program installed. Achieving this task is possible with nohup cmd by backgrounding the ping process, like so:
guoi@host:~$ nohup ping google.com >ping.log &[1] 45931hipo@host:~$ nohup: ignoring input and redirecting stderr to stdout
Afterwards even after closing up the opened ssh session or console (tty) / terminal (pts) on which the ping process is background nohup prevents the ping to be sent kill SIGNAL so the process continues running in the background.
Later on to check in real time the statistics of the continuous ICMP ping requests tail, less, or cat can be used for example watching the tail:
hipo@host:~$ tail -f ping.log
64 bytes from fx-in-f106.1e100.net (74.125.39.106): icmp_req=562 ttl=51 time=44.0 ms
64 bytes from fx-in-f106.1e100.net (74.125.39.106): icmp_req=563 ttl=51 time=43.8 ms
64 bytes from fx-in-f106.1e100.net (74.125.39.106): icmp_req=564 ttl=51 time=43.3 ms
64 bytes from fx-in-f106.1e100.net (74.125.39.106): icmp_req=565 ttl=51 time=43.1 ms
64 bytes from fx-in-f106.1e100.net (74.125.39.106): icmp_req=566 ttl=51 time=43.4 ms
64 bytes from fx-in-f106.1e100.net (74.125.39.106): icmp_req=567 ttl=51 time=43.6 ms I’m using Linux / BSD for quite a lot of time and never before put in use the nohup cmd I guess there are more ppl who never heard of this handy UNIX basic command. Hope I’m not the only one who never heard about it and its useful knowledge to someone out. Cheers 😉
One of my friends Windows 7 started returning errors while trying to open from My Computer the local Windows C, D and E drives. This error appeared immediately, after malware and registry fix up programs were run on the PC. The exact programs that lead his PC into the state of returning an error:
This file does not have a program associated with it for performing this action. Create an association in the Set Associations control panel
are:
a-squared
Registry Booster
This two programs by the way are doing quite a good job on fixing Windows XP and Windows Vista PCs which were cleaned up earlier with Malware Bytes and Avira , however it seems they’re not 100% still compatible with the Windows 7 registry database or some uncleaned malware or virus on the PC has post-messed up the registry file associations. As its always the case with Windows you don’t have a clear idea what’s going …
Anyways as said the PC was in a bad situation, where neither Windows Explorer nor in any mean the disk drives can be opened or red, hence there was need for a quick way to revert back the default Windows file association registry settings After some quick research online, I’ve found an archive containing default Windows registry values for file associations
Therefore to revert back all Windows 7 file extensions from Windows install time, I had to download the file All_Default_File_Extensions.zip , extract the archive with WinZip or WinRar and run each of archive contained .reg extension files. The .reg files had to be run with Administrator account. It takes a while and its a bit irritating until all of the .reg files are run and all the file association default Windows settings are reverted back but thankfully in the end the C drive opening error:
This file does not have a program associated with it for performing this action … is resolved. Cheers 😉
It took me like 1 hour of search on the Internet and looking through forum threads and sites to properly install all the hardware. In hope to help someone out there looking to install the hardware Window drivers on ATI RAdeon HD 2600 XT, I’ve made a small archive of all the drivers necessery to make the Video card , Sound Card and Ethernet be properly installed and operating.
Installation of the drivers on Windows is pretty straight forward download the ATI Radeon HD 2600 XT archive extract and install each one of the files contained in the archive. A few restarts will also be necessery after some of the installed drivers to make the drivers work.
ATI Catalyst (included in the archive) will install the Video drivers for the Radeon XT 2600, whether AD1988AB_Audio_V6585_XpVistaWin7 and 11-11_xp32-64_hdmiaudio will install the Audio drivers. Attansic_L1_Lan_V1737907_V10560011159 contained in the archive needs to be extracted and installed to make the Attensic L1 Gigabit ethernet to show up as installed hardware in Windows device manager.
Hope this post will save some time to ppl looking to install the same drivers on XP 😉 Cheers 😉
Every now and then I had to tamper routing tables in Linux and every time I had to do it I forgot how I did it last time so finally I decided to put it on my blog and find how I can delete from Linux routing table easier
Deleting a record from a wrong routing table on Linux is a piece of cake basicly, here is an example:
linux:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.1 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
Let’s say this is the routing table and it’s incorrect as the routing through the node 169.254.0.0 should not be there. Here is how the routing through 169.254.0.0 can be deleted:
linux:~# /sbin/route del -net 169.254.0.0 netmask 255.255.0.0
Now here is the difference after deletion:
linux:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.1 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
If you want to delete the default gateway just use 0.0.0.0, e.g. -net 0.0.0.0 .. in above cmd example. This would delete default gateway record from routing table which by the way in routing tables is marked with the UG flag. Cheers 😉
I needed to generate new password for proxy user configured on SQUID proxy server configured with digest user authentication. My dear colleague was kind to provide me with the below script, which generates the one line string which needs to go to the squid user password file:
#!/bin/sh
user="$1";
realm="$2";
pass="$3";
if [ -z "$1" -o -z "$2" -o -z "$3" ] ; then
echo "Usage: $0 user password 'realm'";
exit 1
fi
ha1=$(echo -n "$user:$realm:$pass"|md5sum |cut -f1 -d' ')
echo "$user:$realm:$ha1"
The script accepts three arguments; proxy-server:~# ./squid_generate_pass.sh Usage: ./squid_generate_pass.sh user password 'realm'
Thus to generate a new user and password and insert it immediately into let’s say a squid configured user/pass file in /etc/squid3/users execute command:
Where Squid_Configured_Realm depends on the realm name configured in squid.conf, for example if squid.conf includes some auth configuration similar to:
auth_param digest program /usr/lib/squid3/digest_pw_auth -c /etc/squid3/users
auth_param digest children 2
auth_param digest realm My_Proxy_Realm
acl localusers proxy_auth REQUIRED
The realm script argument should be My_Proxy_realm . If squid_generate_pass does completes without errors, it should add a line to /etc/squid3/users file similar to:
If you’re administrating a Cpanel server and you come across an error message while trying to use cpanel’s domain addon menu and you want to fix that you will need to do the following logged in as root over an ssh connection:
1. Remove dns related stuff in /var/named and /var/named/cachecpanel:~# rm -f /var/named/mydomain.com.dbcpanel:~# rm -f /var/named/cache/mydomain.com.db
2. Edit the current used httpd.conf on the server and remove all virtualhost domain definitions
cpanel:~# vim /etc/httpd/conf/httpd.conf
# find the mydomain.com Virtualhost definitions and completely remove them
3. Remove any domain occurance in /var/cpanel/users
cpanel:~# cd /var/cpanel/users/
cpanel:/var/cpanel/users# grep -rli 'mydomain.com' *
/var/cpanel/users/hipo
cpanel:~# vim /var/cpanel/users/hipo
# remove in above file any domain related entries
3. Remove anything related to mydomain.com in /etc/userdomains and /etc/localdomains
cpanel:~# vim /etc/userdomains
cpanel:~# vim /etc/localdomains
# again look inside the two files and remove the occuring entries
4. Edit /etc/named.conf and remove any definitions of mydomain.com
cpanel:~# vim /etc/named.conf
# in above file remove DNS configuration for mydomain.com
This step is optional though I think it’s also a good practice as it will at least restart the Cpanel webserver (Apache or Litespeed depending on your conf)
cpanel:~# /etc/init.d/cpanel restart
Now try to add up the domain via the Cpanel domain addon interface, hopefully the issue should be fixed by now. If not you might also check if there is no some record about mydomain.com in the mysql server. Cheers 😉