<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Ampersand</title><link>https://blog.jimjh.com/</link><description></description><lastBuildDate>Sat, 02 Feb 2019 00:00:00 -0800</lastBuildDate><item><title>Moved</title><link>https://blog.jimjh.com/moved.html</link><description>&lt;p&gt;New content will be available at &lt;a href="https://medium.com/@jimjh"&gt;https://medium.com/@jimjh&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Sat, 02 Feb 2019 00:00:00 -0800</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2019-02-02:/moved.html</guid><category>Software</category></item><item><title>Building Elastic Clusters</title><link>https://blog.jimjh.com/building-elastic-clusters.html</link><description>&lt;p&gt;(Authors: James Lim, &lt;a href="http://addumb.com/"&gt;Adam Gray&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;One of the main advantages of using a cloud provider, such as Amazon Web
Services (AWS), is the ability to launch new instances on demand. However, it
also means giving up control over physical machines and their retirement
schedules; the cloud provider may terminate or …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Mon, 04 May 2015 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2015-05-04:/building-elastic-clusters.html</guid><category>Software</category><category>distributed</category><category>devops</category></item><item><title>dragon - an OSS File System for Hadoop</title><link>https://blog.jimjh.com/dragon-an-oss-file-system-for-hadoop.html</link><description>&lt;p&gt;&lt;a href="http://www.aliyun.com/product/oss/"&gt;OSS&lt;/a&gt; is Aliyun’s offering of a distributed, highly available storage service.
&lt;a href="https://github.com/quixey/dragon-oss"&gt;dragon&lt;/a&gt; allows YARN applications (incl. MapReduce jobs) to read and write data
to OSS through the HDFS API. This allows you to swap filesystems without
modifying your YARN application, MapReduce job, Pig script, Hive script etc.&lt;/p&gt;
&lt;p&gt;The source …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Wed, 29 Oct 2014 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2014-10-29:/dragon-an-oss-file-system-for-hadoop.html</guid><category>Software</category><category>hadoop</category><category>oss</category></item><item><title>Stripe CTF 2014, Level 3 - Instant Code Search</title><link>https://blog.jimjh.com/stripe-ctf-2014-level-3-instant-code-search.html</link><description>&lt;p&gt;The task was to write, in Scala:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;an indexer that scans a bunch of input files, and&lt;/li&gt;
&lt;li&gt;a searcher that takes a query string and returns a list of lines containing it&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It can be solved using the following:&lt;/p&gt;
&lt;p&gt;In the indexer, tokenize each document, and create an inverted index …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Sun, 06 Apr 2014 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2014-04-06:/stripe-ctf-2014-level-3-instant-code-search.html</guid><category>Software</category><category>scala</category><category>stripe</category></item><item><title>Stripe CTF 2014, Level 2 - Defending against a DDOS attack</title><link>https://blog.jimjh.com/stripe-ctf-2014-level-2-defending-against-a-ddos-attack.html</link><description>&lt;p&gt;If your service comes under a major DDOS attack, what would you do?&lt;/p&gt;
&lt;p&gt;In the third level of Stripe’s CTF, participants were tasked to build a proxy
to defend a couple of backend servers against a DDOS attack. The proxy needed
to do the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;distribute requests across a …&lt;/li&gt;&lt;/ul&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Sun, 30 Mar 2014 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2014-03-30:/stripe-ctf-2014-level-2-defending-against-a-ddos-attack.html</guid><category>Software</category><category>nodejs</category><category>stripe</category></item><item><title>Stripe CTF 2014, Level 1</title><link>https://blog.jimjh.com/stripe-ctf-2014-level-1.html</link><description>&lt;p&gt;This is the second installment of a series on Stripe's CTF 2014. You may wish
to start from &lt;a href="https://blog.jimjh.com/stripe-ctf-2014-level-0.html"&gt;level 0&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Level 1&lt;/h3&gt;
&lt;p&gt;Level 1 proposed a crypto-currency named Gitcoin that used Git's SHA1 hashes. The player was provided with a git repository and asked to create a commit with a …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Sat, 08 Mar 2014 00:00:00 -0800</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2014-03-08:/stripe-ctf-2014-level-1.html</guid><category>Software</category><category>ruby</category><category>stripe</category></item><item><title>Stripe CTF 2014, Level 0</title><link>https://blog.jimjh.com/stripe-ctf-2014-level-0.html</link><description>&lt;p&gt;I participated in a week-long CTF hosted by Stripe in Jan 2014. This series of blog posts will cover some of the problems and their solutions.&lt;/p&gt;
&lt;h3&gt;Level 0&lt;/h3&gt;
&lt;p&gt;The first level was a breeze, and mainly served as an introduction/tutorial
for participating in the CTF. We were given the …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Sun, 23 Feb 2014 00:00:00 -0800</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2014-02-23:/stripe-ctf-2014-level-0.html</guid><category>Software</category><category>ruby</category><category>stripe</category></item><item><title>How to Create a Websocket Server in Ruby</title><link>https://blog.jimjh.com/how-to-create-a-websocket-server-in-ruby.html</link><description>&lt;p&gt;This is a short tutorial on creating a websocket server in Ruby using James Coglan's &lt;a href="https://github.com/faye/websocket-driver-ruby"&gt;websocket driver&lt;/a&gt;. The complete example is available on &lt;a href="https://github.com/jimjh/echo-websocket/blob/master/server.rb"&gt;github&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;About Websocket Driver&lt;/h3&gt;
&lt;p&gt;The &lt;a href="http://rubygems.org/gems/websocket-driver"&gt;websocket-driver&lt;/a&gt; gem decouples the websocket protocol from the I/O layer, providing drivers that handle the websocket procotol (handshakes, upgrades etc) on …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Wed, 21 Aug 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-08-21:/how-to-create-a-websocket-server-in-ruby.html</guid><category>Software</category><category>ruby</category></item><item><title>Thoughts from Reading Code - Foreman and Pipes</title><link>https://blog.jimjh.com/thoughts-from-reading-code-foreman-and-pipes.html</link><description>&lt;h3&gt;Using Pipes for Cheap IPC&lt;/h3&gt;
&lt;p&gt;A &lt;a href="https://en.wikipedia.org/wiki/Pipeline_(Unix)"&gt;UNIX pipe&lt;/a&gt; is a unidirectional interprocess communication channel with
a read end and a write end. You have probably used pipes in the command line.
For example,&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;$ git ls-files &lt;span class="p"&gt;|&lt;/span&gt; xargs grep foo
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;This executes both commands concurrently and creates a pipe for interprocess
communication …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Mon, 12 Aug 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-08-12:/thoughts-from-reading-code-foreman-and-pipes.html</guid><category>Software</category><category>ruby</category><category>reading</category></item><item><title>Thoughts from Reading Code - Foreman</title><link>https://blog.jimjh.com/thoughts-from-reading-code-foreman.html</link><description>&lt;p&gt;I read a lot of open source code in my free time to make myself a better engineer. Here are some of my notes from reading foreman's &lt;a href="https://github.com/ddollar/foreman/blob/master/lib/foreman/cli.rb"&gt;cli.rb&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Code Style - Raising Exceptions with a Bang&lt;/h3&gt;
&lt;p&gt;You might occasionally encounter code that looks like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;process&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kp"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;raise …&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Tue, 30 Jul 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-07-30:/thoughts-from-reading-code-foreman.html</guid><category>Software</category><category>ruby</category><category>reading</category></item><item><title>Introducing Verbal, a Ruby Gem</title><link>https://blog.jimjh.com/introducing-verbal-a-ruby-gem.html</link><description>&lt;p&gt;I recently released &lt;a href="https://rubygems.org/gems/verbal"&gt;Verbal&lt;/a&gt;, a ruby gem that provides a fluent
DSL for creating regular expressions. It's a fork of jehna's popular
&lt;a href="https://github.com/jehna/VerbalExpressions"&gt;VerbalExpressions&lt;/a&gt; javascript library. Detailed documentation and code
examples are available at &lt;a href="http://rubydoc.info/gems/verbal/Verbal"&gt;rubydoc.info&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To create a regular expression that matches &lt;code&gt;http&lt;/code&gt;, &lt;code&gt;https&lt;/code&gt;, &lt;code&gt;ftp&lt;/code&gt;, and &lt;code&gt;sftp&lt;/code&gt;,
one can use …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Sat, 27 Jul 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-07-27:/introducing-verbal-a-ruby-gem.html</guid><category>Software</category><category>ruby</category></item><item><title>Event Tracking with Google Analytics and LaunchRock</title><link>https://blog.jimjh.com/event-tracking-with-google-analytics-and-launchrock.html</link><description>&lt;p&gt;It's easy to create a landing page with LaunchRock, but getting meaningful analytics out of it is more difficult. For example, I still have not figured out a way to run a Google Analytics experiment on LaunchRock - using custom Javascript code in LaunchRock sometimes crashes the previewer, forcing me to …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Fri, 19 Jul 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-07-19:/event-tracking-with-google-analytics-and-launchrock.html</guid><category>Analytics</category><category>javascript</category><category>analytics</category></item><item><title>Making Conditional Requests with Peter Murach's gem</title><link>https://blog.jimjh.com/making-conditional-requests-with-peter-murachs-gem.html</link><description>&lt;p&gt;GitHub imposes a rate limit on API requests, and encourages developers to use &lt;a href="http://developer.github.com/v3/#conditional-requests"&gt;conditional requests&lt;/a&gt;. Here is how to do that using Peter's popular &lt;a href="https://github.com/peter-murach/github"&gt;github api gem&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Method A - Faraday HTTP Cache w. ActiveSupport::Cache&lt;/h2&gt;
&lt;p&gt;This uses the &lt;a href="https://github.com/plataformatec/faraday-http-cache"&gt;faraday-http-cache gem&lt;/a&gt;, which takes care of expiration, etags, and response statuses.&lt;/p&gt;
&lt;script src="https://gist.github.com/jimjh/5961836.js"&gt;&lt;/script&gt;

&lt;h2&gt;Method …&lt;/h2&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Fri, 19 Jul 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-07-19:/making-conditional-requests-with-peter-murachs-gem.html</guid><category>Software</category><category>ruby</category><category>github api</category></item><item><title>jQuery Plugin - Box Lid Menu</title><link>https://blog.jimjh.com/jquery-plugin-box-lid-menu.html</link><description>&lt;p&gt;Smashing Magazine wrote &lt;a href="http://www.smashingmagazine.com/2013/07/11/innovative-navigation-designs/"&gt;a piece&lt;/a&gt; about &lt;a href="http://www.toybox.co.nz/"&gt;Toybox&lt;/a&gt;'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 &lt;a href="https://github.com/jimjh/box-lid/"&gt;jQuery plugin&lt;/a&gt; to replicate the effect. Here is a &lt;a href="https://jimjh.com/box-lid/"&gt;demo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Most of the …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Thu, 11 Jul 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-07-11:/jquery-plugin-box-lid-menu.html</guid><category>Software</category><category>javascript</category><category>jquery</category><category>css</category></item><item><title>A Short Tutorial on Custom Storyboard Segues</title><link>https://blog.jimjh.com/a-short-tutorial-on-custom-storyboard-segues.html</link><description>&lt;p&gt;&lt;em&gt;This is a repost from my old blog.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;We will use the &lt;a href="http://www.cmumobileapps.com/2011/10/25/a-really-short-tutorial-on-storyboards/"&gt;last tutorial&lt;/a&gt; as a base to learn how to use custom segues.&lt;/p&gt;
&lt;p&gt;Suppose you don't want to &lt;em&gt;push&lt;/em&gt; between view controllers. In particular,
suppose you want first view controller to &lt;em&gt;flip&lt;/em&gt; to the second view controller.
To achieve …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Mon, 01 Jul 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-07-01:/a-short-tutorial-on-custom-storyboard-segues.html</guid><category>Software</category><category>ios</category><category>storyboards</category><category>segues</category></item><item><title>Compiling open source libraries with Android NDK: Part 2</title><link>https://blog.jimjh.com/compiling-open-source-libraries-with-android-ndk-part-2.html</link><description>&lt;p&gt;&lt;em&gt;This is a repost from my old blog.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;For the second part of this series, we will deal with the compiling of open
source libraries that have several makefiles.&lt;/p&gt;
&lt;p&gt;Android NDK r5 added support for prebuilt libraries and also included
standalone toolchains that could be used to compile open-source libraries …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Mon, 01 Jul 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-07-01:/compiling-open-source-libraries-with-android-ndk-part-2.html</guid><category>Software</category><category>android</category><category>ndk</category></item><item><title>Implementing a Singleton in iOS</title><link>https://blog.jimjh.com/implementing-a-singleton-in-ios.html</link><description>&lt;p&gt;&lt;em&gt;This is a repost from my old blog.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;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
&lt;a href="https://encrypted.google.com/search?q=ios+singleton&amp;amp;ie=utf-8&amp;amp;oe=utf-8&amp;amp;aq=t"&gt;Web&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;The …&lt;/h2&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Mon, 01 Jul 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-07-01:/implementing-a-singleton-in-ios.html</guid><category>Software</category><category>cocoa</category><category>ios</category></item><item><title>Using Karma with Rails and Jenkins: Part 1</title><link>https://blog.jimjh.com/using-karma-with-rails-and-jenkins-part-1.html</link><description>&lt;p&gt;In a recent project, I experimented with &lt;a href="http://angularjs.org"&gt;AngularJS&lt;/a&gt; on
Rails, and managed to get &lt;a href="http://karma-runner.github.io/0.8/index.html"&gt;Karma&lt;/a&gt; to work nicely with Jenkins on
&lt;a href="http://cloudbees.com"&gt;CloudBees&lt;/a&gt;. This post documents the steps I took. (Part 2
will cover e2e tests, if I get that sorted out.)&lt;/p&gt;
&lt;p&gt;An example project is available on &lt;a href="https://github.com/jimjh/karma-rails"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Setup&lt;/h2&gt;
&lt;p&gt;First …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Mon, 01 Jul 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-07-01:/using-karma-with-rails-and-jenkins-part-1.html</guid><category>Software</category><category>rails</category><category>ruby</category><category>karma</category><category>jenkins</category></item><item><title>Playing with Stripe CTF</title><link>https://blog.jimjh.com/playing-with-stripe-ctf.html</link><description>&lt;p&gt;I was playing around with Stripe's &lt;a href="https://github.com/stripe-ctf/stripe-ctf-2.0"&gt;source code&lt;/a&gt; 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 &lt;code&gt;srv.rb&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;unless&lt;/span&gt; &lt;span class="n"&gt;username&lt;/span&gt; &lt;span class="o"&gt;=~&lt;/span&gt; &lt;span class="sr"&gt;/^\w+$/&lt;/span&gt;
  &lt;span class="n"&gt;ie&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Invalid username. Usernames must match /^\w …&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Fri, 21 Jun 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-06-21:/playing-with-stripe-ctf.html</guid><category>Software</category><category>ruby</category><category>security</category></item><item><title>Experimenting with Git Hooks</title><link>https://blog.jimjh.com/experimenting-with-git-hooks.html</link><description>&lt;p&gt;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
&lt;code&gt;feature/&lt;/code&gt;, &lt;code&gt;bug/&lt;/code&gt;, or &lt;code&gt;chore/&lt;/code&gt;. This allows us to use wildcards when …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Mon, 17 Jun 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-06-17:/experimenting-with-git-hooks.html</guid><category>Software</category><category>bash</category><category>git</category></item><item><title>Deployment is Scary - Part 2</title><link>https://blog.jimjh.com/deployment-is-scary-part-2.html</link><description>&lt;p&gt;The is the second installation of a series of posts about my deployment experiences with Enteract. Part 1 is available &lt;a href="https://blog.jimjh.com/deployment-is-scary-part-1.html"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this post, I will focus on our use of &lt;a href="https://github.com/lostisland/faraday"&gt;Faraday&lt;/a&gt; and &lt;a href="http://upstart.ubuntu.com/"&gt;Upstart&lt;/a&gt; for some simple monitoring.&lt;/p&gt;
&lt;h2&gt;Faraday&lt;/h2&gt;
&lt;p&gt;We wanted a tool to monitor the web application and notify …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Fri, 24 May 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-05-24:/deployment-is-scary-part-2.html</guid><category>Software</category><category>ruby</category><category>rails</category></item><item><title>Predicting User Ratings on Yelp</title><link>https://blog.jimjh.com/predicting-user-ratings-on-yelp.html</link><description>&lt;p&gt;Several weeks ago, Yelp launched a &lt;a href="https://www.yelp.com/dataset_challenge/dataset"&gt;dataset challenge&lt;/a&gt; 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 &lt;a href="https://blog.jimjh.com/downloads/2013/05/12/netflix.pdf"&gt;Netflix project&lt;/a&gt;  was versatile enough …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Tue, 14 May 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-05-14:/predicting-user-ratings-on-yelp.html</guid><category>Software</category><category>machine learning</category><category>matlab</category><category>yelp</category></item><item><title>Deployment is Scary - Part 1</title><link>https://blog.jimjh.com/deployment-is-scary-part-1.html</link><description>&lt;p&gt;As part of a class project, I was given the opportunity to field a Rails application at &lt;a href="http://www.contrib.andrew.cmu.edu/~sc0v/"&gt;Spring Carnival&lt;/a&gt;, an annual event held by Carnegie Mellon University (official &lt;a href="http://www.hss.cmu.edu/pressreleases/pressreleases/IScarnivalcontest.html"&gt;press release&lt;/a&gt;.) Here, I will describe a subset of the risk mitigation strategies that we used to avoid hacking and maximize uptime …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Sun, 12 May 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-05-12:/deployment-is-scary-part-1.html</guid><category>Software</category><category>ruby</category><category>rails</category></item><item><title>Numbering the Last Line of Align* in LaTex</title><link>https://blog.jimjh.com/numbering-the-last-line-of-align-in-latex.html</link><description>&lt;p&gt;On numerous occasions, I find myself trying to number the last line (and &lt;em&gt;only&lt;/em&gt;
the last line!) of a long series of derivations in an &lt;code&gt;align*&lt;/code&gt; environment. I
usually switch to the &lt;code&gt;align&lt;/code&gt; environment and use &lt;code&gt;\notag&lt;/code&gt; to turn off the
number on each line except the last.&lt;/p&gt;
&lt;p&gt;There is …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Sat, 30 Mar 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-03-30:/numbering-the-last-line-of-align-in-latex.html</guid><category>Writing</category><category>latex</category></item><item><title>Some Custom Matchers for RSpec with Shoulda</title><link>https://blog.jimjh.com/some-custom-matchers-for-rspec-with-shoulda.html</link><description>&lt;h3&gt;It should have a valid factory&lt;/h3&gt;
&lt;p&gt;I use &lt;a href="https://github.com/thoughtbot/factory_girl"&gt;Factory Girl&lt;/a&gt; in my tests, and I have found it useful to
check that I have valid factories for each model in my tests/specs. Here is a
matcher you can use for that purpose.&lt;/p&gt;
&lt;script src="https://gist.github.com/jimjh/5263666.js"&gt;&lt;/script&gt;

&lt;p&gt;Add this file to &lt;code&gt;spec/support&lt;/code&gt;. Then …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Thu, 28 Mar 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-03-28:/some-custom-matchers-for-rspec-with-shoulda.html</guid><category>Software</category><category>ruby</category><category>rspec</category><category>shoulda</category><category>factory_girl</category></item><item><title>Deploying a Thrift Server with Capistrano</title><link>https://blog.jimjh.com/deploying-a-thrift-server-with-capistrano.html</link><description>&lt;p&gt;At the time of writing, I couldn't find an existing &lt;a href="http://capistranorb.com/"&gt;Capistrano&lt;/a&gt;
recipe for deploying &lt;a href="http://thrift.apache.org/"&gt;thrift&lt;/a&gt; servers. So &lt;a href="https://github.com/jimjh/capistrano-thrift-example"&gt;here&lt;/a&gt; is an example
that works with ubuntu.&lt;/p&gt;
&lt;p&gt;Before you use the recipe, don't forget to update the configuration options to
match your server setup. At the very least, you will need to …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Wed, 20 Mar 2013 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2013-03-20:/deploying-a-thrift-server-with-capistrano.html</guid><category>Software</category><category>ruby</category><category>thrift</category><category>capistrano</category></item><item><title>Monopoly Heat Map</title><link>https://blog.jimjh.com/monopoly-heat-map.html</link><description>&lt;p&gt;I am working on a Monopoly manual for my professional writing class, and did a
heat map showing the relative probabilities of landing on each square of the
Monopoly board. It's done using canvas on HTML5.&lt;/p&gt;
&lt;p&gt;Here is a preview:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Monopoly Heat Map" src="https://blog.jimjh.com/images/2012/11/heatmap.png" title="Monopoly Heat Map"&gt;&lt;/p&gt;
&lt;p&gt;Check it out &lt;a href="https://jimjh.com/monopoly-heatmap/"&gt;here&lt;/a&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Mon, 19 Nov 2012 00:00:00 -0800</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2012-11-19:/monopoly-heat-map.html</guid><category>Random</category><category>monopoly</category><category>heatmap</category><category>visualization</category></item><item><title>Passwordless Kerberized SSH for CMU's UNIX machines</title><link>https://blog.jimjh.com/passwordless-kerberized-ssh-for-cmus-unix-machines.html</link><description>&lt;p&gt;If you use SSH frequently to access &lt;code&gt;unix.andrew.cmu.edu&lt;/code&gt;, you must have tried at some point to set up &lt;a href="http://osxdaily.com/2012/05/25/how-to-set-up-a-password-less-ssh-login/"&gt;passwordless login&lt;/a&gt; using public/private keys. That didn't work for me, and when I did &lt;code&gt;ssh -vv unix.andrew.cmu.edu&lt;/code&gt;, it always failed at&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;debug2&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;we&lt;/span&gt; &lt;span class="n"&gt;did&lt;/span&gt; &lt;span class="n"&gt;not …&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Thu, 08 Nov 2012 00:00:00 -0800</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2012-11-08:/passwordless-kerberized-ssh-for-cmus-unix-machines.html</guid><category>Software</category><category>ssh</category><category>kerberos</category><category>unix</category><category>cmu</category></item><item><title>Backbone, Faye, and Reaction</title><link>https://blog.jimjh.com/backbone-faye-and-reaction.html</link><description>&lt;p&gt;I was jealous of what MeteorJS did for NodeJS developers, and decided to steal
some of their ideas for Rails. The result is the &lt;a href="https://github.com/jimjh/reaction"&gt;reaction gem&lt;/a&gt;, and
a demo app can be downloaded from &lt;a href="https://github.com/jimjh/reaction-todos"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Transparent Synchronization&lt;/h2&gt;
&lt;p&gt;Using Reaction, you write your app like a usual Backbone app. However, instead …&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Fri, 02 Nov 2012 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2012-11-02:/backbone-faye-and-reaction.html</guid><category>Software</category><category>ruby</category><category>rails</category><category>javascript</category><category>mvc</category></item><item><title>Hello world</title><link>https://blog.jimjh.com/hello-world.html</link><description>&lt;p&gt;This is my first blog post using Pelican.&lt;/p&gt;
&lt;p&gt;I first tried using Wordpress, then migrated to Tumblr. Hope this works better!
Old posts are still accessible at &lt;a href="http://jim-lim.tumblr.com"&gt;tumblr&lt;/a&gt;. This one is starting anew.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Lim</dc:creator><pubDate>Wed, 24 Oct 2012 00:00:00 -0700</pubDate><guid isPermaLink="false">tag:blog.jimjh.com,2012-10-24:/hello-world.html</guid><category>Blog</category><category>blogging</category><category>test</category></item></channel></rss>