Index | Archives | Tags

Stripe CTF 2014, Level 3 - Instant Code Search

The task was to write, in Scala:

  • an indexer that scans a bunch of input files, and
  • a searcher that takes a query string and returns a list of lines containing it

It can be solved using the following:

In the indexer, tokenize each document, and create an inverted index ...

More

Stripe CTF 2014, Level 2 - Defending against a DDOS attack

If your service comes under a major DDOS attack, what would you do?

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:

  • distribute requests across a ...
More

Stripe CTF 2014, Level 1

This is the second installment of a series on Stripe's CTF 2014. You may wish to start from level 0.

Level 1

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

More

Stripe CTF 2014, Level 0

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.

Level 0

The first level was a breeze, and mainly served as an introduction/tutorial for participating in the CTF. We were given the ...

More

How to Create a Websocket Server in Ruby

This is a short tutorial on creating a websocket server in Ruby using James Coglan's websocket driver. The complete example is available on github.

About Websocket Driver

The websocket-driver gem decouples the websocket protocol from the I/O layer, providing drivers that handle the websocket procotol (handshakes, upgrades etc ...

More

Thoughts from Reading Code - Foreman and Pipes

Using Pipes for Cheap IPC

A UNIX pipe 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,

$ git ls-files | xargs grep foo

This executes both commands concurrently and creates a pipe for interprocess communication ...

More

Thoughts from Reading Code - Foreman

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

Code Style - Raising Exceptions with a Bang

You might occasionally encounter code that looks like this:

def start(process=nil ...
More

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

More

Event Tracking with Google Analytics and LaunchRock

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

More

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

Jim LimGitHubLinkedInStackOverflowontoplist ⋅ Theme by Giulio Fidente.