GIT ALIAS FOR SIMPLIFYING GITHUB PULL REQUESTS

As cqlengine has picked up in popularity, so has my need to review pull requests. Here’s the git alias that I’m using: [alias] pr = "!f() { git checkout -b pr_$1; curl https://github.com/cqlengine/cqlengine/pull/${1}.patch | git apply -3 - ; }; f " To use, you simply git pr 51 or whatever the pull request is. Here’s what it’s doing: Creating a branch pr_[pull request number] Pulling down the patch Piping the patch to apply.

CORS WITH WILDCARD SUBDOMAINS USING NGINX

This was originally posted on the SHIFT developers blog. First off - what is CORS? CORS is a means of allowing cross site requests. You can read up in lengthy detail on it’s features here. Simply put, it lets you be on one domain, and perform XMLHttpRequests to another, which is normally not allowed due to the Same Origin Policy. The domains that may hit your server must be specified in your configuration.

CASSANDRA FAQ: CAN I START WITH A SINGLE NODE?

A frequently asked question on the mailing list by developers new to Cassandra is if it’s possible to start with a single node and scale up as their needs grow. This seems to come most often from people familiar with MySQL, Mongo, or another database which uses replication to scale reads. The short answer to this question is yes, you can absolutely run a one node cluster. However, it’s important to understand the caveats of doing so.

SETTING UP A WIRELESS ACCESS POINT WITH UBUNTU RARING RINGTAIL

I’ve finally gotten sick of having a terrible wireless signal in my room, and I have a server in my office (hard wired via gigabit) so I figured I’d set it up as a wireless access point. There’s a lot of information in various places on how to set everything up, so I figured I’d try to wrangle everything in 1 spot. Install the card. I used a TP-Link WDN4800. Sadly I don’t have a list of all the compatible wireless cards, but it seems that having something based on the Atheros chipset is a good thing.

WHAT'S NEW IN CQLENGINE 0.7

Recently we released version 0.7 of cqlengine, the Python object mapper for CQL3. We’ve been steadily moving towards full support of all of CQL3 for both queries and for table configuration. This post will outline the new features and provide examples on how to use them. Counters With counter support finally included it’s now possible to create and use tables with counter columns. They are exposed to the Python application as simple integers, and changes to their values will be sent as deltas to Cassandra.

CREATING AWS CLOUDWATCH ALARMS USING BOTO

In this post I’ll walk through the process of setting up cloudwatch alarms programatically in Python through Boto. We’ll be setting up a single alarm for a metric StatusCheckFailed, but you can configure other alarms as well. Check the AWS alarms console for the full list. This post assumes you already have an instance, instance_id, AWS, and your boto config set up. Also assumed is that you’ve created a SNS Topic already.

I'VE MOVED TO PELICAN

As of Sunday, August 25, rustyrazorblade is now powered by pelican. So far, no complaints. It was easy to get started. Installed through pip into a virtualenv and up and running in just a few minutes. It was a significantly better experience than my attempt at using octopress, which mixed theming, code, and my content all into one mess of a projct. The new blog is just a folder of content (markdown), my theme, and a Makefile.

ADVANCED DEVOPS WITH VAGRANT AND LXC

This post was originally published on the SHIFT developer blog. Creating and testing new databases that require clustering can be a pain point when trying to do everything on a local machine. Simulating failures or network failures can be difficult or impossible if everything you’re testing is running on the same machine. To better simulate your production environment you can try using LXC (Linux Containers). A linux container is a lot like a Virtual Machine, but shares the host’s Kernel and as a result has very little overhead.

CASSANDRA, CQL3, AND TIME SERIES DATA WITH TIMEUUID

Cassandra is a BigTable inspired database created at Facebook. It was open sourced several years ago and is now an Apache project. In cassandra, a row can be very wide and is identified by a key. Think of it as more like a giant array. The data is stored on disk sorted by the key you pick, meaning if you pick the right sort option and key you can have some really fast queries.

SETTING UP RAID0 IN UBUNTU 12.04 IN AWS HIGH I/O

Amazon announced high I/O instances today. This is huge for anyone with a database larger than available memory, as it’s been a complete nightmare dealing with EBS up till now. Now your Cassandra, MongoDB, MySQL, or whatever your using should be able to perform well without requiring keeping your entire dataset in memory. With each instance you get 2x1TB of disk. In this tutorial I’ll be setting it up as a RAID0 to get a single 2TB disk which should deliver excellent performance.