Index ¦ Archives ¦ RSS > Category: Software

Introducing Verbal, a Ruby Gem

I recently released Verbal, a ruby gem that provides a fluent DSL for creating regular expressions. It's a fork of jehna's popular VerbalExpressions javascript library. Detailed documentation and code examples are available at rubydoc.info.

To create a regular expression that matches http, https, ftp, and sftp, one can use …


Making Conditional Requests with Peter Murach's gem

GitHub imposes a rate limit on API requests, and encourages developers to use conditional requests. Here is how to do that using Peter's popular github api gem.

Method A - Faraday HTTP Cache w. ActiveSupport::Cache

This uses the faraday-http-cache gem, which takes care of expiration, etags, and response statuses.

Method …


jQuery Plugin - Box Lid Menu

Smashing Magazine wrote a piece about Toybox's navigation menu today, describing the user experience as "peeking behind the page or the lid of a toybox". I really liked the design, took a shot at creating a jQuery plugin to replicate the effect. Here is a demo.

Most of the …


A Short Tutorial on Custom Storyboard Segues

This is a repost from my old blog.

We will use the last tutorial as a base to learn how to use custom segues.

Suppose you don't want to push between view controllers. In particular, suppose you want first view controller to flip to the second view controller. To achieve …


Compiling open source libraries with Android NDK: Part 2

This is a repost from my old blog.

For the second part of this series, we will deal with the compiling of open source libraries that have several makefiles.

Android NDK r5 added support for prebuilt libraries and also included standalone toolchains that could be used to compile open-source libraries …


Implementing a Singleton in iOS

This is a repost from my old blog.

While I was at Apple’s Cocoa Camp over summer, one of the speakers talked rather passionately about the proper, thread-safe way to implement a singleton in iOS, which I thought deserves more attention than it currently does on the Web.

The …


Using Karma with Rails and Jenkins: Part 1

In a recent project, I experimented with AngularJS on Rails, and managed to get Karma to work nicely with Jenkins on CloudBees. This post documents the steps I took. (Part 2 will cover e2e tests, if I get that sorted out.)

An example project is available on GitHub.

Setup

First …


Playing with Stripe CTF

I was playing around with Stripe's source code for last year's CTF, and from what I could see online, most people solved Level 4 by using XSS in the password field. But look at the following line in srv.rb:

unless username =~ /^\w+$/
  ie("Invalid username. Usernames must match /^\w …

Experimenting with Git Hooks

I have been trying to follow a more disciplined approach to branching in my projects to allow easier tracking and regression. For example, I learnt that it's a good idea to prefix branch names with category tokens, such as feature/, bug/, or chore/. This allows us to use wildcards when …


Deployment is Scary - Part 2

The is the second installation of a series of posts about my deployment experiences with Enteract. Part 1 is available here.

In this post, I will focus on our use of Faraday and Upstart for some simple monitoring.

Faraday

We wanted a tool to monitor the web application and notify …

© James Lim. Built using Pelican. Theme by Giulio Fidente on github.