Doing Front-end from Scratch?

The beauty of developing web apps using front-end frameworks comes two fold:

Focus

You don’t have to code the front-end part of the web app. This leaves you focusing on the back-end and its architecture (database, frameworks, patterns etc). All front-end frameworks come with the important HTML, CSS and Javascript components to build a full fledged app. Plus they’re mobile responsive.

Save time and energy on what’s important as a web developer. Continue reading Doing Front-end from Scratch?

July 22, 2016

Posted In: Information Technology

Tags:

Leave a Comment

Ruby on Rails Routes

Ruby on Rails Logo
Ruby on Rails Logo

I’m currently working on a personal project (transportation web application system) and writing it in Ruby on the Rails framework. Its a great learning experience but I struggled learning the Routes concept until I came across this informative article:

http://www.theodinproject.com/ruby-on-rails/routing

Its might help if you get stuck when learning the ropes of RoR.

Happy Coding!

June 28, 2016

Posted In: Information Technology

Tags: ,

Leave a Comment

Raspberry Pi Adventures – Chapter 2: GPIOs and LED

In the previous post, we looked at accessing the Raspberry Pi Compute Module via another computer through SSH. The Pi can do a gazillion things. It depends on how imaginative and creative you are.  For now, I want to show you something simple; lighting up three LEDs through the Pi using the GPIO (General Purpose Input Output). Since the Raspberry Pi Compute module is a bootstrapped version of the normal Raspberry Pi, we will use the CMIO’s GPIO pins.

For further explanation on GPIO, read this article.

What’s in the Cooking Pot?

Basically, we’re sending two signals to the 3 LED to go on and off 10 times in a sequence. What do I need to achieve this? Continue reading Raspberry Pi Adventures – Chapter 2: GPIOs and LED

May 27, 2016

Posted In: Information Technology

Tags:

Leave a Comment

Create a Bootable Windows USB in Linux

This is something I had struggled with: I wanted to create a bootable Windows USB drive using a Linux distro OS (Lubuntu in my case) but without luck I was unable to given the various suggestions provided on various online forums. However, I came across a solution that purely uses the CLI (command line interface) and it actually worked:

http://serverfault.com/questions/6714/how-to-make-windows-7-usb-flash-install-media-from-linux

In summary, to create the bootable USB drive:

  • Format USB drive to NTFS
  • Create MBR (Master Boot Record) on the USB drive using the ms-sys tool
  • Copy content of Windows OS to the USB drive
  • Install when you plug in the USB drive to another machine

April 12, 2016

Posted In: Information Technology

Tags: , , ,

Leave a Comment

Composer Does Not Install

Image from Composer website https://getcomposer.org/
Image from Composer website https://getcomposer.org/

Today, I’m trying out a new PHP framework called Slim, a micro-framework. It has a minimal foot print as stated but I will find out by the end of the day. I’m building a simple web app that pulls data from a Piwik instance using the Piwik Repotrting HTTP API. I need to build something quick hence the use of this small framework. The creator’s of the framework say that an afternoon is enough to learn the framework (I hope so). Of course, a good background in PHP is a must.

Composer, a PHP dependency manager, is a first requirement to be able to install Slim. However, as I was installing composer in a folder, I got the following error (I’m developing in a Mac OSX environment):

All settings correct for using Composer

Downloading…

Could not create file /Users/brianbirir/Sites/piwik/composer.phar: fopen(/Users/brianbirir/Sites/piwik/composer.phar): failed to open stream: Permission denied

Download failed: fopen(/Users/brianbirir/Sites/piwik/composer.phar): failed to open stream: Permission denied

fwrite() expects parameter 1 to be resource, boolean given

after writing the following command:

curl -sS https://getcomposer.org/installer | php

Solution:

Just add sudo before curl and php  and composer shall install. Remember composer should be installed in the folder where your project will run from or where the source code is stored.

 

UPDATE One:

Because I need to implement the project ASAP, I decided to move on with CodeIgniter, a framework I’m very familiar with (I’ll learn Slim later, maybe the coming week). But to pull the data from the API, I need to use something that would consume the JSON via HTTP, basically a HTTP client. I decided to use Requests for PHP. It does not rely on cURL and is framework agnostic. There are other PHP REST clients (e.g. Guzzle) but this is the simplest (See page on Why Requests). I will post another blog article on using Code Igniter together with Requests for PHP.

January 13, 2016

Posted In: Information Technology

Tags: , , ,

Leave a Comment