NURUL FERDOUS

What is crontab? crontab  is  a  program which is used to install, deinstall or list the tables used to drive the cron(8) daemon in Vixie Cron. You can easily  have your    own    crontab,    and    though    these    are    files   in /var/spool/cron/crontabs, they are not intended to be edited  directly.
If  the /etc/cron.allow file exists, then you must be listed therein in order to be allowed to use this command.  If the  /etc/cron.allow  file does  not  exist  but the /etc/cron.deny file does exist, then you must not be listed in the /etc/cron.deny file in order to use this  command. If neither of these files exists, then depending on site-dependent configuration parameters, only the super user will be allowed to use  this command,  or  all  users will be able to use this command. For standard Ubuntu or Debian systems, all users may use this command.
The options of crontab command are given below:
If the -u option is given, it specifies the  name  of  the  user  whose crontab  is  to be tweaked.  If this option is not given, crontab examines “your” crontab, i.e., the crontab of the person executing the command.
crontab -l will show you your currently set up cron jobs on the server.
crontab -r will delete your current cron jobs.
crontab -e will allow you to add or edit your current cron jobs by using your default text editor to edit your “crontab file”. In my case Nano
Note that, vi has a bug in it and won’t work to edit your crontab! We recommend nano (which is just like pico), which is the default editor anyway! Read the rest of this entry »

Tags: , ,

I wrote a plugin for wordpress this week, you might know already that. But you might not know that I have been rewarded a SmugMug pro account for free which worths $150 yearly charge for integrating the SmugMug API with wordpress. Thanks goes to Markham Bennett the developer account manager of SmugMug for his approval.

What I found within these few days that SmugMug is a not a merely photo hosting website like picasa, flickr etc but also it provide an awesome way to make money by selling your creativity through their website.

SmugMug released HD video player that really works great here. While other photo sharing sites have added video, they have tiny little videos that only are allowed to be 90 seconds. And people wonder why SmugMug has hundreds of thousands of people paying real money for its services? What you think?

A WordPress plugin for grabbing images and image info from SmugMug, Flickr, Picasa etc RSS feed. It uses the lastRSS PHP class written by Vojtech Semecky. I have taken some reference from Hasin vai’s works. This is why this plugin is dedicated to my hero Hasin Hayder. Thanks also goes to Lenin for giving me this work . Actually this plugin is developed for the owner of http://www.seismictalk.com though, as per the consent of Mr Brian Brigg, we are giving this plugin for free :p

Download: You may download it from here

ABOUT:
The fdsPhotoFEED class uses the lastRSS class to grab images from a SmugMug, Flickr, Picasa etc RSS feed to display on any wordpress hosted website. It provides access to the image’s title, description, SmugMug, Flickr, Picasa etc page URL, and the image in any size that SmugMug, Flickr, Picasa etc offers.

Features:
1. It can fetch photos from SmugMug.
2. It can fetch photos from Flickr.
3. It can fetch photos from Picasa & any other RSS feed.
4. It supports image caching
5. It supports lightbox2 slideshow with navigation button Prev &
Next.
6. Image Caption is fetched and shown in lightbox2 show
Read the rest of this entry »

1. Which of the following is not valid PHP code?
A. $_10
B. ${“MyVar”}
C. &$something
D. $10_somethings
E. $aVaR

Answer: PHP variables always start with a dollar sign and are a sequence of characters and numbers within the Latin alphabet, plus the underscore character. ${“MyVar”} is a valid variable name that simply uses a slightly less common naming convention, while &$something is a reference to the $something variable. Variables, however cannot start with numbers, making $10_somethings invalid and Answer D correct.

2. Which language construct can best represent the following series of if conditionals?
<?php
if($a == ‘a’) {
somefunction();
} else if ($a == ‘b’) {
anotherfunction();
} else if ($a == ‘c’) {
dosomething();
} else {
donothing();
}
?>
A. A switch statement without a default case
B. A recursive function call
C. A while statement
D. It is the only representation of this logic
E. A switch statement using a default case

Answer: A series of if…else if code blocks checking for a single condition as above is a perfect place
to use a switch statement:
<?php
switch($a) {
case ‘a’:
somefunction();
break;
case ‘b’:
anotherfunction();
break;
case ‘c’:
dosomething();
break;
default:
donothing();
}
?>
Because there is a catch-all else condition, a default case must also be provided for that
situation. Answer E is correct. Read the rest of this entry »

Tags: ,

Sometimes we need to set a default text on our form to give the user an idea about the text field. Suppose the google search box where the default text is Google when you click on it it will be disappeared and it checks on onblur event whether it is Google or not. If anything other than Google / Blank is written that it keeps it or it recall the text Google. Now how can we do that?

Here you go:

Step-1: set the following javascript code snippet in the head section of your HTML/PHP file

<script type=”text/javascript”>
function clickclear(thisfield, defaulttext) {
if (thisfield.value == defaulttext) {
thisfield.value = “”;
}
}
function clickrecall(thisfield, defaulttext) {
if (thisfield.value == “”) {
thisfield.value = defaulttext;
}
}
</script>

Step-2: Now write your input text field as given below:

<input type=”text” name=”ielts” size=”10″ value=”IELTS score” onclick=”clickclear(this, ‘IELTS score’)” onblur=”clickrecall(this,’IELTS score’)” />

and you are done :d

I would like to share my Ubuntu experiance with you, thus I am giving you some exact steps to follow for achiving satisfaction in Ubuntu Linux.

Here you are:

Command Usage
sudo apt-get install php Install the latest version of PHP
sudo apt-get install mysql-server Install the latest version of MySQL server
sudo apt-get install phpmyadmin To install phpMyAdmin
sudo apt-get install apache For installing Apache web server
sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin To link phpmyadmin in your webserver’s root directory
sudo /etc/init.d/apache2 force-reload To force restart Apache server (now you could access localhost/phpmyadmin from your web browser 🙂
sudo apt-get install filezilla for installing FileZilla
sudo apt-get install vlc To install the famous player VLC ( might ask for the hardy heron DVD 😦 )
sudo apt-get install netbeans it’s a famous WYSIWYG editor for developers :p
sudo apt-get install banshee a cool multimedia player
sudo apt-get install scim-m17n for Bangla computing developed by Omi Azad vai
sudo apt-get install konsole A great replacement of gnome-terminal with root user facility in Ubuntu

Tonight up to this, may be I will write some more commands later 🙂

fdsPhotoFEED v1.0.0

A WordPress plugin for grabbing images and image info from SmugMug, Flickr, Picasa etc RSS feed. Uses the lastRSS PHP class written by Vojtech Semecky. I have taken some reference from Hasin vai’s works. This is why this plugin is dedicated to my hero Hasin Hayder. Thanks also goes to Lenin for giving me this work . Actually this plugin is developed for the owner of http://www.seismictalk.com. As per the permission of http://www.seismictalk.com owner we will release it for free!!

ABOUT:

The fdsPhotoFEED class uses the lastRSS class to grab images from a SmugMug, Flickr, Picasa etc RSS feed to display on any wordpress hosted website. It provides access to the image’s title, description, SmugMug, Flickr, Picasa etc page URL, and the image in any size that SmugMug, Flickr, Picasa etc offers.

Features:

  1. It can fetch photos from SmugMug.
  2. It can fetch photos from Flickr.
  3. It can fetch photos from Picasa.
  4. It supports image caching
  5. It supports lightbox2 slideshow with navigation button Prev & Next.
  6. Image Caption is fetched and shown in lightbox2 show

Installation & Usage:

  • Download and unzip the latest version of the plug-in.
  • If you have a previous version of fdsPhotoFEED installed, disable it on the WordPress Plugins page.
  • Place the “fdsPhotoFEED” folder in your “wp-content/plugins/” directory (over write the old folder if it exists).
  • Activate fdsPhotoFEED on the WordPress Plugins page.
  • Insert “{rss uri=yourFeedURLgoesHere limit=10}” (minus the quotes and spaces) in the source of any page or post you want to display the form on.

sample formats of the {rss} tag

1.{rss uri=http://seismictalk.smugmug.com/hack/feed.mg?Type=nicknameRecentPhotos&Data=SeismicTalk&format=rss200 limit=5}

there are 2 attribute in this {rss} tag which we look for

1. uri = rss feed location

2. limit = how many photo to show

Download:

Please wait for a few more days to get your copy as I have got some license issues 😦

N.B.: You may have look on the usage of my plugin here: http://www.seismictalk.com/

I am Nurul Ferdous a Zend Certified Engineer (ZCE), serving at Bangladesh Internet Press Limited (BIPL) as programmer. I am a FOSS advocate and love RnD.

Categories

Me @ LinkedIn

View Nurul Ferdous's profile on LinkedIn

My Photos @ Flickr

Blog Stats

  • 42,387 [ Vistors ]

My Twitter Updates