Mindblown: a blog about philosophy.

  • Google AdWords – Click Fraud Rate

    Google believes the click fraud rate is less than 2%. The facts support the opposite and click fraud is running rampage on Google’s networks, including their search sites. For us, we only leave about 5% impressions/clicks on AdSense, which has a much lower quality than Google-operated sites. Clicks: 314 Invalid: 67 Click Fraud Rate: 17.59%…

  • Adding a second hard drive under Linux/CentOS

    Check out the new new drive In this example, you will see I have 2x500GB drives, sda and sdb. sda already in used and sdb is new. [root@s3 mathie]# fdisk -l Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot…

  • Getting lighttpd RPM

    There are many places you can download the latest lighttpd RPMs: Primary: http://packages.sw.be/lighttpd/ http://dag.wieers.com/rpm/packages/lighttpd/ Secondary: EL4: http://ftp.freshrpms.net/pub/freshrpms/redhat/testing/EL4/lighttpd/ EL5: http://www.kevindustries.com/media/kw/files/linux/lighttpd/RPMS/EL5/ EL5 x86_64: http://linuxwave.blogspot.com/2007/08/installing-lighttpd-in-centos-5-for.html 1.4.17: http://www.kevindustries.com/media/kw/files/linux/lighttpd/RPMS/

  • Stress test a new server

    Got a new server and want to stress test its CPU & disk? Run Folding@Home or other computing service and also BitTorrent (download some Linux distros like Fedora, CentOS). Testing and yet help the community. Folding @ Home wget http://www.stanford.edu/group/pandegroup/folding/release/FAH6.02-Linux.tgz tar -zxf FAH6.02-Linux.tgz ./fah6 –config echo “./fah6 -smp -verbosity 9 $* &” > fah chmod…

  • How to automatically reboot after a kernel panic?

    You should investigate the root cause when possible but if the machine needs to be up and running again without much interruption, you can have it reboot when panicking after a number of seconds. Put this into /etc/sysctl.conf kernel.panic = 60

  • jQuery.com down or super slow

    Anyone knows a downloadable documentation for jQuery. Their site is so slow that makes referencing impossible. This is an recurring issue that has happened for quite a few months. Is the traffic too much for them to handle?

  • jQuery not selecting nested elements

    For a jQuery newbie, I was unsure how to only select the TR’s of the main table and not TR’s within sub-tables. Tried this that (children(), siblings()) and a bunch of selectors and found out the easy way (‘#mytable > tbody > tr’) How easy! 🙂

  • Improve security for apc.php

    If you’re running APC with PHP, you have the option to download apc.php to view, monitor the usage/stats. However, the default authentication is very open. Without any credential, anyone can view the running stats and also the cached filenames (a simple search on “APC INFO” will show some site running APC). The login is to…

  • pecl and memory limit error

    If you run “pecl install [something]” and get this error: “Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate xxx bytes)”, you want to change “/usr/bin/pecl” (or run “locate pecl” to see where it is) and specify a larger memory limit. #!/bin/sh exec /usr/bin/php -C -n -q -d include_path=/usr/share/pear \ -d output_buffering=1…

  • ip_conntrack and dropped packets

    For busy servers, ip_conntrack can fill up quickly and must be monitored or you will get intermittent packet drops. Check var/log/messages for these error messages. Couple values can be adjusted to the kernel: more /proc/sys/net/ipv4/netfilter/ip_conntrack_count more /proc/sys/net/ipv4/netfilter/ip_conntrack_max => count should be less than max, if it’s near the maximum value, increase max more /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_established =>…

Got any book recommendations?