How to add a confirmation dialog box in AngularJS

Setting up a confirmation box can be quite tricky, here's how to quickly get a confirmation box setup in AngularJS.

»
Author's profile picture David Chua

Fix AngularJS from loading twice error on Rails 4

If you're running a Rails 4.x app with AngularJS, and you're getting increasingly frustrated with receiving "AngularJS loaded twice" errors and you can't seem to figure out what went wrong, perhaps you might want to make sure you do two things first:

»
Author's profile picture David Chua

How to fix BigDecimal returning as Strings in Rails

Something that I've just found out recently.

»
Author's profile picture David Chua

How to Move your Rubygems from one Ruby version to another in RVM

Today's post is going to be a pretty short one.

»
Author's profile picture David Chua

How to Generate PDFs with HTML templates in 10 minutes with Rails

Generating PDF for your webapplication is not that difficult as you think.

»
Author's profile picture David Chua

Setting up your First Ruby Environment

Setting your ruby environment can be quite difficult.

»
Author's profile picture David Chua

Remove title bar in your Android App

To remove the title bar in your android app, add the following in your Activity's onCreate() method.

»
Author's profile picture David Chua

Run a webrick server to serve static html content in a folder

Need a quick way to serve html files?

»
Author's profile picture David Chua

Selectively routing connections through VPN on OSX

When connecting your OSX machine to your VPN and you only want to access the resources on the private network and not tunnel your entire connection through, in OSX, add the following:

»
Author's profile picture David Chua

Figure out which DNS server you are using

If you need to find out what DNS you are currently using (for troubleshooting purposes, this snippet might help):

»
Author's profile picture David Chua

Link your custom app to your Gnome Applications

If you're running GNOME and you have a custom script/app that you want to be able to run quickly from your applications bar, you can easily add an entry with the following:

»
Author's profile picture David Chua

Authenticating with Pagekite API using Ruby

If you're using pagekite, you probably have read this document.

»
Author's profile picture David Chua

MySQL backup process

How I usually prepare the backup regime of my mysql/mariadb databases of all my newly provisioned servers is to do the following tasks:

»
Author's profile picture David Chua

Custom Timestamp attributes for Activerecord

In ActiveRecord, when working with legacy database and the existing database uses different fields for last_update and created_at, how do you specify the correct column names for ActiveRecord to properly record timestamps?

»
Author's profile picture David Chua

Equivalent of try() for hashes? - Ruby

To do a try() on hashes, its as simple as:

»
Author's profile picture David Chua