Tutorials

HTML Parsing in Python 3.4 using LXML

HTML Parsing in Python 3.4 using LXML

LXML is a nice little document parser for lightweight and effective HTML/XML parsing without using regular expressions. The module can be installed with relative ease using pip and works for Python 2 and 3. Let’s get the token and expire form values from NYTimes site for an example. More

PyMySQL: Pure Python MySQL client, perfect for Python 3+

PyMySQL: Pure Python MySQL client, perfect for Python 3+

It took me a while to get MySQL working on Python 3.4. I started with MySQLDB, but figured it doesn’t work on Python 3 and above. Then I stumbled upon a nice pure-python MySQL client called PyMySQL. Guess what. It works! Here’s a tutorial on how to set it up on your Mac. More

Asynchronous HTTP Requests in Python 3.4

Asynchronous HTTP Requests in Python 3.4

I started learning Python last night. I will be lying if I say “it’s good”. I’ll tell you what, “it’s f**king good”. I am a polyglot programmer and diving in Python was a cinch. It felt as if I knew it already, because “it makes sense”. I’ve been playing around with Python 3.4 and here’s an experiment. More

Playing with the Hacker News API using Guzzle

Playing with the Hacker News API using Guzzle

Hacker News released its API to the world a few days ago. Data geeks previously had to rely on web scraping and paginated results to obtain data from the Hacker News site, but things have changed now. With Hacker News’ official API, we have a structured way to tap into the data.  More

Geo-targeting your website to a specific country

Geo-targeting your website to a specific country

What if I could show you a way to restrict users on your website by geo-location? With just a few lines of PHP code, you can restrict, or depending on the situation, show, different content to users from different countries. I am sure you get the idea. More

Laravel 4 Pagination with Infinite Scroll using jQuery

Laravel 4 Pagination with Infinite Scroll using jQuery

This tutorial is born right from the Vinkk code base.  I was in the same boat as you a few weeks ago, and when I didn’t find out something elegant, I decided to roll up my own solution. Well, in true Mr. Geek fashion, I am sharing with you the “Laravel 4 Pagination with Infinite Scroll using jQuery” tutorial. More

Managing Assets in Laravel 4 using Helpers and HTML Builder

Managing Assets in Laravel 4 using Helpers and HTML Builder

Laravel 4 doesn’t have a lot of documentation on managing assets such as stylesheets or Javascript files. Laravel 3′s documentation did however, but it seems to have been omitted for the newer version somehow. Today, I’ll be showing you some neat ways to manage assets using Helper functions and HTML Builder. More

Dead simple CRUD in Laravel 4

Dead simple CRUD in Laravel 4

I feel I’ve come late to the party. But they say, it’s never too late. Laravel’s community has matured and it’s safe to say the framework has brought the sexy back to PHP. Laravel is dead simple. It’s expressive, elegant, and extremely powerful at the same time.  More

Setting up Laravel 4 on OS X 10.9 Mavericks

Setting up Laravel 4 on OS X 10.9 Mavericks

I come from the world of CodeIgniter, the ailing framework who was once the Zeus of the PHP framework arena. I have written around 20,000 lines of code in CodeIgniter, and developed a marketplace platform back in 2012. More