Archive

Archive for May, 2010

Top 10 operating system, Personal opinion about OS

May 20, 2010 Leave a comment

Think this first:
Computer operating system selection is like selecting which women to get married, that will be trusted and honest? ex: Asian or European or African or Arabian or Japanese which women you like and want to get married? Well i like as following order:

1. European (all the beauty flavor)   2. Arabian (beauty+fight flavor)  3. Asian (beauty+fight+trust flavor)   4. Japan (no idea)   5. Africa (never tried)

* Now, if you understand this consequence above, you can read the following, and make your target:

GET to the point, selecting is difficult, you cant tell the best, because i explained above.
1. Unix
#AIX from IBM is the most top secret and most expensive and most powerful OS (test of real unix)
– whole rack will be fill up by this, no place to put your pen

#Solaris from Sun (oracle), is the second stay able system with SPARC
– wow, its very strong, for stability

#FreeBSD from BSD, the real unix flavor is really really fantastic unix
– you have all choice for packages, which is really hard for rest unix

#Damn small FreeBSD
– you lost your hard disk, how can you still use your RAM space?

2. Linux
Never forget, linux came from unix, the god father is Unix
#Red hat linux / Centos (i love it)
– enterprise minded, sleep enterprise, wakeup enterprise mind
– its very very good for linux

#Fedora desktop (i love it)
– multimedia/graphics/etc

#Debian
– guru for software collection

#Ubuntu
– guru for software collections

# OpenSUSE
– trying to bring mac/windows/linux in a meet me room

#Damn small Linux
– Runs on ram, 50MB os, have everything on it

3. Mac – the only one, i never used it yet, because you pay for it
– graphics the best choice
– if i get a mac gift cd, i would have tried in my vm
– getting involve with mac is same getting involve with windows, they have similar policy, pay for it, means go to jail

4. Windows – pay and get virus
– honestly i dont want to buy 0 cent of product from windows, as a technical person, but i have to pay because community use it
– Outlook express bug, Internet Explorer bug – would you give me a job? to write for you a bug best software?

5. IOS – networking protection and signaling
6. Mobile os – symbian

How to crontab cronjob auto tasks setup

May 20, 2010 Leave a comment

How to basic cron tab? Which can automatically execute my tasks/ and i can sleep 1 hour extra?

Know this:
# show me if there is job listed
[root@example ~]# crontab -l
MAILTO=”xxx@xxx.com”
5 * * * * /usr/bin/php -v >/dev/null 2>&1
[root@example ~]#

# some how you need to delete
crontab -r

# just getting start, by this

[root@example mqueue]# crontab -e
5 * * * * /run/my/script.sh | mailx email@domain.com

Basic rule to remember:
* (minutes 0 – 59) * (hours 0 -59) * (days 1-31) * (months 1 – 12) * (day of week 0 – 6, 0=sunday) __your_command__
* = every

Example 1: Send email every 10 minutes delay
*/10 * * * * php /execute.php | mailx -s “YO humans” support@www.be
OR
0,10,20,30,40,50 * * * * php /execute.php | mailx -s “Works” support@www.be

Example 2: Every day 11:01AM send me a report
1 11 * * * php /execute.php | mailx -s “YO boss” support@www.be

Example 3: Every Friday 01:00AM send me a report
0 1 * * 5 php /execute.php | mailx -s “YO books to read till Sunday” support@www.be

Example 4: Every Monday till Friday, 09:00AM send email to bad customers, to pay invoices
0 9 * * 1-5 php /invoice.php | mailx -s “YO client, pay my bills” customer.router@www.be

Example 5: Do jobs but dont show the outputs
*/10 * * * * php /execute.pp > /dev/null

Categories: centOS, Fedora 12

Regex cheat sheet

May 11, 2010 Leave a comment

Javascript: var rxxx = /^.$/;  // start end anything allow  if( reg.test(‘abc123’) == true) { // do this…}

Email

remail = /^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/;

Name:

var rname = /^\d+|\d+[a-zA-Z]+$/; // disallow digit or alphabet + digit

Street:

var rstreet = /.+/; // greater then 1 input

Phone:

var rphone = /^[0-9]+$/; // allow number inputs

Website:

rwebsite = /^((http|https|ftp):\/\/)?([\w-]+\.)+([\w-.\/?%&=]*)?$/;

Categories: JavaScript

Centos – Failed opening required ‘Spreadsheet/Excel/Writer.php’

May 2, 2010 Leave a comment
Warning: require_once(Spreadsheet/Excel/Writer.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/html/index.php on line 11</div>
<div>Fatal error: require_once() [function.require]: Failed opening required 'Spreadsheet/Excel/Writer.php' (include_path='.:/tmp/PEAR/') in /var/www/html/index.php on line 11</div>
<div>

1. php.ini file is having incorrect, path settings for your pear


[root@www html]# grep include_path /etc/php.ini
; (directory must also be in include_path or full path must
include_path=".:/usr/share/PEAR/"
[root@www html]# grep open_basedir /etc/php.ini
; open_basedir, if set, limits all file operations to the defined directory
open_basedir = "/var/www/html:/root/PEAR:/usr/bin/php:/usr/include/php:/tmp/"
[root@www html]#
2. Restart httpd
Done.
Categories: centOS, Fedora 12, PHP