Milk’s Benefits for Fit Guys

Got milk? If you’re trying to put on muscle, you better. Whole milk was once a staple for guys who were packing away calories and moving massive amounts of iron in order to go from pencil neck to bull neck. These days we know enough to shun or restrict the saturated-fat-filled whole variety in favor of skim, but even the fat-free version has its detractors. Some claims against milk link it to childhood diabetes, while others allege widespread pesticide contamination of dairy products. Continue reading “Milk’s Benefits for Fit Guys”

Cycling Technique : Standing Climbing

An understanding of technique and how to use your strength are critical if you want to climb effectively out of the saddle.

Even more costly on the cardiovascular system than seated climbing, a standing climb uses more muscle groups and requires a fit and functional core if you are going to effectively transfer power from your upper to lower body and vice versa. Aside from sprinting, it is the most ‘whole body’ form of exercise on the bike for cyclists. Continue reading “Cycling Technique : Standing Climbing”

Training Effect

Training Effect Guides You for Effective Exercise

Training Effect is a personalized measure to gauge the effect of exercise on aerobic fitness on a scale from 1.0 to 5.0. It helps to see how easy or hard your workouts are by visualizing the effect of the workout automatically, already in real-time. Simply start your workout, exercise freely as you like and stop when satisfied with the result. Based on the results, it is easy to understand the actual effects of your workouts to make sure you are performing the workouts optimally and not too easy or too hard.

Continue reading “Training Effect”

Multiple Domain for Single WordPress Installation

I’ve 2 domains (mohdneotech.com & mohdnordin.com) and wanted to point those 2 to the same single wordpress installation. Here’s what I did.

1. Point both domains to same public IP at DNS A record.
2. Just add these 2 lines into wp-config.php

1
2
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);

That’s all =)

Malam Nisfu Syaaban

Tarikh malam Nisfu Syaaban 2013 di Malaysia mengikut kalendar islam. Nisfu Syaaban merupakan pertengahan bulan atau 15 Syaaban dalam kalender Hijrah. Dalam Kaledar islam, 10 Jun 2013 merupakan bermulanya awal bulan Syaaban iaitu 1 Syaaban. Oleh itu, pada 15 hari dalam bulan Syaaban, 24 Jun adalah Nisfu Syaaban yang bersamaan dengan 15 Syaaban 1434H. Manakala malam Nisfu Syaaban pada 23 Jun selepas waktu Maghrib.

Tarikh Penting Bulan Syaaban 2013

  • 1 Syaaban 1434H: 10 Jun 2013
  • 15 Syaaban 1434H: 24 Jun 2013 Isnin (Nisfu Syaaban)
  • Malam Nisfu Syaaban: 23 Jun 2013: sebaik sahaja lepas waktu Maghrib

Pengertian Bulan Syaaban
Nisfu Syaaban (Nisf bermaksud separuh) adalah peristiwa hari ke-15 dalam bulan Syaaban tahun Hijrah. Umat Islam mempercayai yang pada malam Nisfu Syaaban, amalan akan dibawa naik oleh malaikat untuk ditukar dengan lembaran amalan yang baru setelah setahun berlalu. Nabi Muhammad s.a.w. menggalakkan umatnya untuk bangun malam dan berjaga serta beriktikaf sepanjang malam kerana tidak mahu amalan diangkat dalam keadaan tidur atau lalai.

Antara Amalan Pada Nisfu Syaaban
1. Membaca Surah Yasin sebanyak tiga kali pada malamnya.
2. Melakukan Qiamullail.
3. Berpuasa pada siang harinya.

Sumber: Tarikh Malam Nisfu Syaaban 2013 Di Malaysia | melvister.com

Finding Duplicates with SQL

Here’s a handy query for finding duplicates in a table. Suppose you want to find all email addresses in a table that exist more than once :-
SELECT email,
COUNT(email) AS NumOccurrences
FROM users
GROUP BY email
HAVING ( COUNT(email) > 1 )
You could also use this technique to find rows that occur exactly once :-
SELECT email
FROM users
GROUP BY email
HAVING ( COUNT(email) = 1 )

Transfer Default MySQL Database Directory From /var To /usr

Default partition size for /var normally not enough to store databases, so we need to store it somewhere bigger (/usr). The steps will show how to transfer database from /var/db/mysql (default path installation for MySQL in FreeBSD) to /usr/local/mysql/data (suggested path). Steps as follows :-

[root@dev /var/db/mysql]# /usr/local/etc/rc.d/mysql-server stop
Stopping mysql.
Waiting for PIDS: 993.
[root@dev /var/db/mysql]# mkdir -p /usr/local/mysql/data
[root@dev /var/db/mysql]# mv * /usr/local/mysql/data/.
[root@dev /var/db/mysql]# cd ../
[root@dev /var/db]# rm -rf mysql
[root@dev /var/db]# ln -s /usr/local/mysql/data mysql
[root@dev /var/db]# chown -R mysql mysql
[root@dev /var/db]# chgrp -R mysql mysql
[root@dev /var/db]# cd /usr/local/
[root@dev /usr/local]# chown -R mysql mysql
[root@dev /usr/local]# chgrp -R mysql mysql
[root@dev /usr/local]# /usr/local/etc/rc.d/mysql-server start
Starting mysql.
[root@dev /usr/local]# ps aux | grep mysql
mysql    46491  0.1  1.1 208112 44860  ??  S     6:15AM   0:00.09 [mysqld]
mysql    46411  0.0  0.0  8264  1920  ??  Ss    6:15AM   0:00.01 /bin/sh /usr/local/bin/mysqld_safe –defaults-extra-file=/var/db/mysql/my.cnf –user=mysql –datadir=/var/db/mysql –pid-file=/var/db/my
root     46494  0.0  0.0  9092  1432   0  S+    6:15AM   0:00.00 grep mysql
[root@dev /usr/local]#

DONE!

HOWTO Delete Old Directory in UNIX

There are 2 ways u can do this. For example if u want to delete directory older than 7 days :

First method :
[text]
find /path/dir -type d -mtime +7 -exec rm -rf {} ;
[/text]

Second method :
[text]
find /path/dir -type d -mtime +7 | xargs rm -rf {} ;
[/text]

You can always change the +7 value to any number of days preferred.
FYI, this command is only for directory deletion, if u want to delete files, u can change the “-type d” (d means directory) to “-type f” (f means files).

Example :
[text]
find /path/dir/unl.txt -type f -mtime +7 | xargs rm -f {} ;
[/text]

P/S : There’s an alternative command which we can use, tmpwatch (more info : http://linux.about.com/library/cmd/blcmdl8_tmpwatch.htm)

mod_dosevasive for Apache

mod_dosevasive is an evasive maneuvers module for Apache to provide evasive action in the event of an HTTP DoS or DDoS attack or brute force attack. It is also designed to be a detection and network management tool, and can be easily configured to talk to ipchains, firewalls, routers, and etcetera. mod_dosevasive presently reports abuses via email and syslog facilities.

Detection is performed by creating an internal dynamic hash table of IP Addresses and URIs, and denying any single IP address from any of the following:
  • Requesting the same page more than a few times per second
  • Making more than 50 concurrent requests on the same child per second
  • Making any requests while temporarily blacklisted (on a blocking list)
This method has worked well in both single-server script attacks as well as distributed attacks, but just like other evasive tools, is only as useful to the point of bandwidth and processor consumption (e.g. the amount of bandwidth and processor required to receive/process/respond to invalid requests), which is why it’s a good idea to integrate this with your firewalls and routers for maximum protection.

Run Multiple Yahoo! Messenger (YM) on PC

doubleym

  1. Make sure Yahoo! Messenger is not running.
  2. Go to Start > Run, type “regedit” & click OK.
  3. Browse to HKEY_CURRENT_USER > Software > yahoo > Test
  4. Right click on the right hand windows,  choose New > DWORD.
  5. Rename the new entry NEW VALUE as Plural. Then double click the entry, change the default value from 0 to 1. Set the base as Decimal.
  6. Close Registry Editor.
  7. Voila! Now you can run Yahoo! Messenger on your PC.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑