Category: Software

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 ...

More

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 ...

More

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 ...

More

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 ...

More

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 ...

More

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 ...

More

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 ...
More

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 ...

More

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 ...

More

Predicting User Ratings on Yelp

Several weeks ago, Yelp launched a dataset challenge and released data on their users and businesses in Phoenix, AZ. The challenge shared some similarities with the Netflix Prize, and I was curious to see if the Alternating Least Squares algorithm that I used for my Netflix project was versatile enough ...

More

Jim LimGitHubLinkedInStackOverflowontoplist ⋅ Theme by Giulio Fidente.