Eid Mubarak!

Alhamdulillah! its another Eid Adha! Eid Mubarak!!! Allahuma Taqabbalallahu minna wa minkum.

May Allah’s blessings and mercy be abundant in our lives and may Jannatul Firdaus be our final abode.
Lets call up our loved ones and spread the love. Not text message, whatsapp, tweet or facebook. Let them hear your voice as we celebrate.

Allahu akbar, Allahu akbar, Allahu akbar, La ilaha Illallahu, Allahu akbar, Allahu akbar, wa lillahi hamdu.

logo-composer-transparent

How to Install composer on Windows with XAMPP

logo-composer-transparent
Recently, I decided to start learning Laravel, a PHP framework that is recommended by lots of blogs and professionals to be one of the best frameworks available for PHP. I use XAMPP on Windows 8.1 for alot of my website development and installing the composer (a  dependency manager for PHP) on the XAMPP installation was a requirement. I was able to achieve it as follows:

1. Make sure you have your XAMPP installed and the folder is on the root of your preferred drive

2. Download the Windows Installer for Composer

3.  Run the installer and click next

4. It will ask you to enable Shell menus, which is ok as you will be able to access composer option whenever you right click on a file

5. You will then be ask to locate ‘php.exe’ in your xampp installation (which is located the in the php folder of your xampp) and click Next

6. If this is your first installation, you will get an error, saying it could not load some modules, this is due to a configuration in ‘php.ini’ file (located in the ‘cfg’ folder under the ‘php’ folder of XAMPP)

7. Locate the Line containing:

extension_dir = "\xampp\php\ext"

and

browscap = "\xampp\php\extras\browscap.ini"

and prepend the drive letter of the location where the xampp folder is located (mine is drive D:), so that they will look like:

extension_dir = "D:\xampp\php\ext"

and

browscap = "D:\xampp\php\extras\browscap.ini"

 

8. Compposer should now install with no error. Enjoy! :)

How to download a file from server to server using PHP on shared hosting

Recenty, I was engaged in a number website migrations between servers. One from a shared hosting to a dedicated cloud server instance on Google Cloud running Debian OS. It was pretty easy, as all that is required is to zip the entire website content using the compress tool provided in the Web host’s control panel, and download to the new server using

wget

command. This is extremely useful, if you have a slow connection, large amount of data  and you want to maintain your directory structure. In my case, I was having tens of thousands of files at different directory levels, all totaling 2.5GB.

Shared Hosting running cPanel

My brother’s website (Mustee’s Clothing) was recently redesigned using wordpress and hosted on a separate domain during design. One Night while working on migrating it to his original domain, the first idea was to download the direcotry containing the design to my PC and later upload to his domain, both using FTP. Then I thought, that will be a serious waste of time and decided to look for easier ways. Then I thought of exploring PHP curl, since I have used it in consuming APIs before. After few minutes of research, I was able to come up with:

<?php
set_time_limit(0);

$url = 'http://olddomain.com/site_content.zip';
$fp = fopen (dirname(__FILE__) . '/site_content.zip', 'w+');

 $ch = curl_init($url);

 curl_setopt_array($ch, array(
 CURLOPT_URL => $url,
 CURLOPT_BINARYTRANSFER => 1,
 CURLOPT_RETURNTRANSFER => 1,
 CURLOPT_FILE => $fp,
 CURLOPT_TIMEOUT => 50,
 CURLOPT_USERAGENT => 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)'
 ));

$results = curl_exec($ch);
if(curl_exec($ch) === false)
 {
 echo 'Curl error: ' . curl_error($ch);
 }
?>

The $url variable contains the link to the compressed site on the old domain, and using curl, the compressed file is downloaded to the same directory the script is contained in. You can then extract the site contents and move it to which ever location you desire, all using the file manager functionality provided by your cPanel installation. The script downloaded the 25MB website content in 2 seconds.

You can explore PHP’s curl further here.

Sound Enhancement

How to Tweak your PC Sound Settings to get Quality Sound with a Headphone

I use a HP Spectre XT Touchsmart, which comes with Beats by Dr. Dre and runs on Windows 8.1. Comes with awesome sound output but when paired with a Nokia BH-503, it gets better. But the Awesomeness becomes greater when you set the Enhancement properties of the Headphone. Here is how to get it done …

  1. Go to the Sound Item in Control Panel
  2. Select the Headphone you want to enhance it’s quality and click properties
  3. Select “Bass Boost”, “Head Phone Virtualization” and “Loudness Equalization” in the dialog box that show

Then Enjoy! Check the pix below…

Sound Enhancement

Sound Enhancement on Windows 8.1

Unserious blogger

Its funny how every now and then, I quarrel with my self about not writing on my blog and promissing to do so regularly, only to fail and repeat the process all over again. Why?!?

I thinks its l largely due to my recent heavy usage of twitter & instagram and the usual cliche called ‘busy’. But come to think of it, I cant be as expressive as necessary on these social platforms like I would on my blog.

So, I guess its time to repeat ‘The Process’ again. At least now, I read more, follow alot of blogs (mostly tech blogs), gradually becoming a book collector ( …waiting for my 40 books order from www.chukzbookstore.com :) ) and I break, tweak, fix and make both virtually in code and physically (…wanabe arduino and raspberry pi hacker).  So I have no excuse not to have something to write about.

I even have WordPress apps on my Samsung Galaxy S3 and Tab 2, which makes it easy to write even while lying down or on transit and the ideas start flowing.

Most importantly is the feeling of knowing that a blog post of yours made someone happy, which is very thrilling.

So, see you around!

Chromecast ready to cast

Streaming Content to Chromecast from a Synology Diskstation

032014_1034_MediaStream2

I have owned a Synology DS112j Diskstation (Details | Buy) and a Google Chromecast (Details | Buy) for almost a year. I use the Diskstation mainly for backup purposes since it came pre-installed with 2 TB harddrive and the Chromecast has been dormant because I can not consistently afford the amount of bandwidth it requires to stream online videos …lol

Chromecast fixed to the HDMI port of my TV

Chromecast fixed to the HDMI port of my TV

My Synology Diskstation with an Airtel Router on top and a Linksys Wireless router beside (black)

My Synology Diskstation with an Airtel Router on top and a Linksys Wireless router beside (black)

Then came the release of Chromecast’s SDK by Google, then everything changed. Though, I installed Aircast for streaming from my android devices but, it doesn’t support most video formats and the content has to be in the device.
Synology also released updates of the Disk Station Manager (DSM 5) and all their mobile apps with chromecast support. Then the fun starts!!! Streaming the Gigabytes of videos on my Diskstation to the TV through chromecast is now a bliss.

Synology
First, you need to make sure the Diskstation and the Chromecast are on the same network. Mine are connected to a Linksys wireless router that has 4 LAN ports, (My Diskstation is mainly connected to the router through the LAN port). I believe you know that you need the Chromecast app on your PC or Mobile device to connect the chromecast to the network, get more info here.
Make sure you have Either DS Video, Audio or Photo installed on your mobile device and updated to the latest versions. Launch it and browse to your desired video, you will notice a Screen icon with a PLAY icon inset, this signifies that the app has discovered a Chromecast on the network and can cast to it. Tap on the icon, you will see the name you have assigned to the Chromecast, Tap on it and the video should start streaming on your TV.

Chromecast Idle Mode

Chromecast Idle Mode

Login to DS Audio

Login to DS Audio

DS Video Login

DS Video Login

DS Audio Playlist

DS Audio Playlist

DS Video Video list

DS Video Video list

DS Audio Casting in progress

DS Audio Casting in progress

DS Video Casting in progress

DS Video Casting in progress

Chromecast ready to cast

Chromecast ready to cast

Also note, Chromecast will not receive any cast if it can’t reach the internet, it will keep saying ‘reconnect me’.

'reconnect me'

‘reconnect me’

I use a Samsung Galaxy S3 with Android 4.3 and Galaxy Tab 2 with Android 4.1.1

Godaddy Hosted Domains

Setting up WordPress Multi-site with Subdomain on Godaddy without Wild-card DNS entry

While working on a WordPress site, I decided to enable Sub-domain Multi-site so that, all departments and units of the organisation can have their separate section.

The Website is hosted on Godaddy and I encountered an issue with the sub-domain option as all the sub-site I was creating were not accessible, I researched and found different hacks but none worked. I even saw one, who advised creating a wild-card DNS entry in the DNS manager (WordPress will also advise you to do this, but it only works when you have dedicated hosting), this resulted in a “page ok” text displaying on all sub-domain created through WordPress.

Finally, I discovered a hack, Creating  a sub-domain in the “Hosted Domains” section of Godaddy’s Control panel for every sub-site created in WordPress and specifying the root folder of the WordPress Installation as the sub-domain’s path. This will allow the DNS to direct your request to the root of the WordPress Installation where “.htaccess” file is waiting to handle the request appropriately.

In the Image below (Click to view larger size), you will notice a sub-domain entry with a “/” as its folder, which is the root of the WordPress installation.

 

Godaddy Hosted Domains

Galaxy S3 Screen shot

Upgrading my Samsung Galaxy S3 to Android 4.3 Jelly Bean and fixing the issues

Just like anyone else, I always get excited when new versions of applications are released and I always try them. As soon as I got information that Samsung has released 4.3 Jelly bean Stock ROM for Galaxy S3, I went online to get information about how to do the upgrade manually, since it will be difficult for me to get OTA updates any time soon.

I stumbled upon this website (http://www.ibtimes.com/android-43-jelly-bean-update-samsung-galaxy-s3-gt-i9300-released-how-install-manually-tutorial) and followed all the guides except for where I missed out a part of the instruction and my phone refused to receive signal, even with the SIM inserted. Then I had to try again by selecting all the modules required by the Odin application. Upon completion, my phone was wiped clean. But no worries, My contacts are backed up at www.google.com/contacts (simply enable the back up option when adding your Gmail account to any android phone, this will save you alot of stress) and SMS Backup+ always synchronizes my messages with my gmail account. Applications can always be downloaded again.

Then came the issues with the Update, the most annoying of which are the hanging, black screen after call and reboots. Luckily, Samsung heard all the complaints from users and they pulled the update from their servers. After several weeks, they released the fix and users in different parts of the world started receiving it in batches. Still, I can’t get it, so I have to search the internet for alternative means. After several days while attending a boring workshop in Kaduna, I read lots of post online on how to get the new fix, none of which were successful. At a point, I had to root the phone, but I still didn’t get what I wanted.

Finally, I came across a XDA Developers Forum post (http://forum.xda-developers.com/showthread.php?t=2561104) and I downloaded the firmware that was repackaged by the author, which was more than 700 MB. According to the Instruction, I rebooted the phone to recovery mode (I was already having Custom recovery due to the rooting I did earlier) and flashed the Firmware I downloaded using the recovery options after copying the files to the phone.

The phone is now more faster and no more hanging! Now with the rooting in place I can now install some cool apps. Check out a screenshot of the Phone:

Galaxy S3 Screen shot

certification

Are you Certified or ‘CertiSHOW’?

certification

Certification is a way of testing proficiency in a field, be it in technology or other areas. There are numerous of them, most popular of which are those sponsored by CISCO Corporation, Microsoft, Oracle, EC-Council, PMP, Prince 2 and others.

A holder of a certification is respected and most times given consideration in selection processes. However, a new trend has evolved especially in Nigeria, where individuals get numerous ‘short-cut’ resources including Q&A materials of a particular certification and spend hours trying to get used to the questions and correct answers.

They have no technical experience,  and are not willing to spend time to get any, all they want is the initials to be attached to their name and on their CV. How will they perform after getting the Job they are seeking, only to be sacked or turned into a paper pusher in the office. Highly experienced techys without certifications are even looked at as inferior, old-school or inexperienced.

I know of an Oracle Certified Associate who cannot properly install the Database, we don’t even need to talk about how he will manage the data. I hardly hear of engineers working for the big tech companies who know today, mentioning the Certifications they’ve gathered but you see what they are capable of in the result of the work they do. Most of them do have the certifications but they dont flaunt it like royal titles.

I am not saying Certifications are not necessary, but know it before you claim you know it.

Speed up your network and block XXX with OpenDNS

First, some intro:

What is OpenDNS, and how to get OpenDNS?

OpenDNS is a free DNS service that can not only speed up your internet but also provide you options like…

  • Web content filtering
  • anti-phishing,
  • malware protection
  • smart cache and much more.

The bottom line is OpenDNS servers have a huge collection IP addresses of millions of web pages. When you look for a website, it immediately finds the corresponding IP address and hence gets it to load faster. It’s intuitive and literally takes less than 10 minutes to set up (no software installation required)

To utilize all its features, all you need to do is sign-up with them here. Basic OpenDNS is suitable for your household devices is free of cost. (For business solutions there is a nominal annual fee)

Once you have signed up, you’ll get a confirmation link in your mailbox. Click on the link and it will redirect you to dashboard settings on the main website.

It will automatically detect your IP address. Click on Add this network button given below your IP address All you need to now is to follow the Instructions provided on the website and add these IP addresses to your router.

Preferred DNS server: 208.67.222.222

Alternate DNS server: 208.67.220.220

Thats it! You’re done

OpenDNS features

By default, nothing is blocked. You have FULL control to select one of 3 pre-sets 1: Low 2: Moderate or 3: High filtering levels

Example: If you choose “Low” filtering level then all the porn sites will be blocked . You increase the filter level to apply more restrictions. There is also a custom filtering levels that allows you to be specific or tweak one of the pre-sets.

You can block or allow any domain of your choice by entering the domain name. It also gives you the ability to add an extra layer of security as it provides malware and botnet protection as well as phishing protection. You may also block internal IP addresses.

(Source: http://askubuntu.com/questions/158572/what-is-the-best-way-to-restrict-access-to-adult-content)

Also there is OpenDNS Family Shield, which blocks adult websites: http://blog.opendns.com/2010/06/23/introducing-familyshield-parental-controls/

 

To get the best of both service, I added all four IP addresses to my DNS forwarders:


[prettify class="bash"]
# sudo nano /etc/bind/named.conf.options

forwarders {
208.67.222.123;
208.67.220.123;
208.67.220.220;
208.67.222.222;
};
[/prettify]