# travis jeffery > Hacker, writer, good guy. Personal blog of Travis Jeffery, infrastructure engineer and author of Distributed Services with Go. Every published post is available in Markdown by appending `index.md` to its URL. Search for Agents API: `GET https://travisjeffery.com/.well-known/search?q={query}` returns relevant content across this site in Markdown (documentation: https://developers.cloudflare.com/ai-search/how-to/search-for-agents/). ## Site - [Homepage (Markdown)](http://travisjeffery.com/index.md): Bio and chronological index of published posts. - [Homepage (HTML)](http://travisjeffery.com/): Main website. - [RSS Feed](http://travisjeffery.com/index.xml): Full post feed in RSS/XML. - [JSON Feed](http://travisjeffery.com/index.json): Recent posts metadata in JSON. ## Posts - [Writing Distributed Services With Go](http://travisjeffery.com/writing-distributed-services-with-go/index.md) (2026-11-05): I wrote a book, Distributed Services with Go, published by the Pragmatic Bookshelf. It's a practical book on distributed systems. It walks you through building a distributed event-stream service from … - [Tidewaiter: a registry proxy that checks packages before you install them](http://travisjeffery.com/tidewaiter-a-registry-proxy-that-checks-packages-before-you-install-them/index.md) (2026-11-03): I built Tidewaiter, a package firewall. Package managers point at it instead of the public registry. It checks each package version against local policy and OSV before download, caches approved … - [Coordinating many agents with Quartermaster](http://travisjeffery.com/coordinating-many-agents-with-quartermaster/index.md) (2026-09-25): Running one agent is easy. You talk to it, it does the work, you review it. Running ten is different. Each one needs its own branch and worktree so they don't trip over each other. Each one needs a … - [pi-autoresearch took our Pulumi preview from minutes to seconds](http://travisjeffery.com/pi-autoresearch-took-our-pulumi-preview-from-minutes-to-seconds/index.md) (2026-03-20): At Oscilar, infrastructure changes go through a deployment service I wrote on top of Pulumi. Before a change ships, we preview it: Pulumi works out what would change in every stack and shows the diff. … - [Hiring is a guess. Firing is a choice.](http://travisjeffery.com/hiring-is-a-guess.-firing-is-a-choice./index.md) (2026-01-30): You can't hire with certainty. Things move too fast to be absolutely sure of everyone. And if you're certain of everyone it's because you're looking at the same signals you know. You're not allowing … - [I built our JIT access system in a day](http://travisjeffery.com/i-built-our-jit-access-system-in-a-day/index.md) (2026-01-23): We wanted just-in-time permissions at Oscilar. The rules are simple: everyone gets read-only by default. If you need to change something, you ask for higher access for a short time. When the time is … - [Segment, 2014-2016](http://travisjeffery.com/segment-2014-2016/index.md) (2025-12-09): Twilio acquired Segment for $3.2 billion in an all-stock deal. I was Segment's 4th engineering hire. I'd finished working at 37signals at my one year Prototyper gig. I worked with Jason Fried, DHH, … - [25 years of Emacs](http://travisjeffery.com/25-years-of-emacs/index.md) (2025-11-16): I began programming with Emacs but didn’t get it. I switched to Vim for a few years, liked its motions but hated its extensibility, and switched back to Emacs. That was 25 years ago. Emacs has never … - [I'll take pkg over internal](http://travisjeffery.com/ill-take-pkg-over-internal/index.md) (2019-11-01): Most people who would bother with the matter at all would admit that the layout of Go projects is in a bad way. To pkg, or not to pkg, that is the question. To put your project’s libraries under a … - [Keep passwords and secrets out of your logs with Go](http://travisjeffery.com/keep-passwords-and-secrets-out-of-your-logs-with-go/index.md) (2018-06-04): External post: https://medium.com/hackernoon/keep-passwords-and-secrets-out-of-your-logs-with-go-a2294a9546ce - [The best books I read in 2017](http://travisjeffery.com/the-best-books-i-read-in-2017/index.md) (2018-02-01): External post: https://medium.com/@travisjeffery/the-best-books-i-read-in-2017-a2fedb81bcd5 - [“username or password incorrect” is bullshit](http://travisjeffery.com/username-or-password-incorrect-is-bullshit/index.md) (2017-12-21): External post: https://medium.com/hackernoon/username-or-password-is-incorrect-is-bullshit-89985ca2be48 - [Hiring woes: the costs of bad hires and how to avoid them](http://travisjeffery.com/hiring-woes-the-costs-of-bad-hires-and-how-to-avoid-them/index.md) (2017-10-04): External post: https://medium.com/hackernoon/hiring-woes-the-costs-of-bad-hires-and-how-to-avoid-them-413395b5ef3 - [Manage Datadog with Terraform](http://travisjeffery.com/manage-datadog-with-terraform/index.md) (2017-09-07): External post: https://medium.com/hackernoon/managing-datadog-with-terraform-89abe0eb62f5 - [How to persuade in online discussions](http://travisjeffery.com/how-to-persuade-in-online-discussions/index.md) (2017-06-14): External post: https://medium.com/hackernoon/how-to-persuade-in-online-discussions-d91ce321c947 - [Building a Kafka that doesn’t depend on ZooKeeper](http://travisjeffery.com/building-a-kafka-that-doesnt-depend-on-zookeeper/index.md) (2017-01-19): External post: https://medium.com/the-hoard/building-a-kafka-that-doesnt-depend-on-zookeeper-2c4701b6e961#.ocjt2bm7t - [EC2’S magical address to get instance metadata](http://travisjeffery.com/ec2s-magical-address-to-get-instance-metadata/index.md) (2016-11-29): There’s a magical address in EC2 that you can query to get metadata on that instance (http://169.254.169.254). What’s especially awesome about it, is that you can use it inside Docker containers which … - [How Kafka’s Storage Internals Work](http://travisjeffery.com/how-kafkas-storage-internals-work/index.md) (2016-10-13): External post: https://medium.com/the-hoard/how-kafkas-storage-internals-work-3a29b02e026#.w69h5yhyz - [Monitoring with InfluxData's TICK stack](http://travisjeffery.com/monitoring-with-influxdatas-tick-stack/index.md) (2016-09-23): External post: https://medium.com/the-hoard/monitoring-with-influxdatas-tick-stack-cafe82a07efc#.xndz40del - [Techniques to Achieve High Write Throughput With Elasticsearch](http://travisjeffery.com/techniques-to-achieve-high-write-throughput-with-elasticsearch/index.md) (2016-06-08): External post: https://medium.com/the-hoard/techniques-to-achieve-high-write-throughput-with-elasticsearch-519ead926b63?source=user_profile - [Using Golang and JSON for Kafka Consumption With High Throughput](http://travisjeffery.com/using-golang-and-json-for-kafka-consumption-with-high-throughput/index.md) (2016-05-09): External post: https://medium.com/the-hoard/using-golang-and-json-for-kafka-consumption-with-high-throughput-4cae28e08f90?source=user_profile - [Graphing Kafka offset lags with StatsD](http://travisjeffery.com/graphing-kafka-offset-lags-with-statsd/index.md) (2016-03-26): I wrote a worker to track consumer offset lags with StatsD so that you can graph them in Grafana or something similar. It’s written in Golang and there’s a Docker image too, so it’s easy to deploy and … - [SSH into EC2 instance with instance ID](http://travisjeffery.com/ssh-into-ec2-instance-with-instance-id/index.md) (2015-11-30): Make sure you’ve installed and configured the aws-cli and jq. Drop this function into your .zshrc or .bashrc: function ec2-ssh () { ssh $(aws ec2 describe-instances --filter Name=instance-id,Values=$1 … - [Outbound connections from Docker with VirtualBox not working?](http://travisjeffery.com/outbound-connections-from-docker-with-virtualbox-not-working/index.md) (2015-11-17): Using Docker and VirtualBox and having trouble making outbound connections? You may have errors similar to: curl: (7) Failed connect to 10.0.2.224:8000; No route to host Error: Redis connection to … - [Building a custom Zendesk app](http://travisjeffery.com/building-a-custom-zendesk-app/index.md) (2015-11-10): Here’s a post on Segment’s blog on a custom Zendesk app I wrote to help our support team. - [Library and Lambda function to show your Rdio heavy rotation on your website](http://travisjeffery.com/library-and-lambda-function-to-show-your-rdio-heavy-rotation-on-your-website/index.md) (2015-10-24): I thought it’d be cool to show what albums I’m listening to lately on my site, so I wrote a client lib and and Amazon Lambbda function to get the albums from your Rdio Heavy Rotation and put them on … - [Error responses on Node.js with Koa](http://travisjeffery.com/error-responses-on-node.js-with-koa/index.md) (2015-10-21): Koa is a web framework that’s the next generation Express in that it’s built by the same team, and aims to be smaller, more expressive, and more robust for building web applications and APIs. It … - [Building infrastructure with Docker, AWS ECS, and Hashicorp's Terraform](http://travisjeffery.com/building-infrastructure-with-docker-aws-ecs-and-hashicorps-terraform/index.md) (2015-10-07): Here’s a post on Segment’s blog on our new infrastructure setup I’ve been working on. - [Piping into a Docker container](http://travisjeffery.com/piping-into-a-docker-container/index.md) (2015-09-25): Here’s how you can write docker images that you can pipe into: Dockerfile, here I’m installing the go programs I’m going to run and pipe into: FROM golang RUN go get github.com/segmentio/throttle RUN … - [Writing your own Emacs interactive functions with completion](http://travisjeffery.com/writing-your-own-emacs-interactive-functions-with-completion/index.md) (2015-09-11): Here’s how to use Ido in Emacs to write your own interactive functions with completion. In this example, we’ll make a function that completes directories but Ido provides functions for reading files, … - [Animated nyan cat in the terminal](http://travisjeffery.com/animated-nyan-cat-in-the-terminal/index.md) (2015-06-25): Fun little project I wrote in Go! Code on GitHub. Or run it yourself: go get github.com/travisjeffery/nyancat && nyancat - [Re-architecting Segment's API](http://travisjeffery.com/re-architecting-segments-api/index.md) (2015-03-25): From a very high level POV, here’s how Segment’s API used to work and works now: Our traffic is to the point where performance problems started emerging where we were blocking our Node api’s event … - [How to hide Chrome's notification icon in the menu bar](http://travisjeffery.com/how-to-hide-chromes-notification-icon-in-the-menu-bar/index.md) (2014-07-24): Open Chrome and in the menu, under “Chrome”, click “Hide Notifications Icon”. Fin. - [NSURLSession and NSOperationQueue working together = TRVSURLSessionOperation](http://travisjeffery.com/nsurlsession-and-nsoperationqueue-working-together-trvsurlsessionoperation/index.md) (2014-06-17): Been meaning on shipping this project for a while now. TRVSURLSessionOperation is an NSOperation subclass that wraps NSURLSessionTask so you can use them in a NSOperationQueue. Check it out on GitHub. … - [Added support for promises in mocha v1.18.0](http://travisjeffery.com/added-support-for-promises-in-mocha-v1.18.0/index.md) (2014-03-14): Recently added support for promises in mocha. Check it out in mocha v1.18.0. :+1: - [Jasmine-jQuery v2 adding support for Jasmine v2](http://travisjeffery.com/jasmine-jquery-v2-adding-support-for-jasmine-v2/index.md) (2014-01-13): I released Jasmine-jQuery v2.0.0 which adds support for Jasmine v2.0.0. Jasmine v2 removed support for replacing built-in matchers, which Jasmine-jQuery made use of to replace toBe() and toContain(), … - [Writing @ prefixed macros](http://travisjeffery.com/writing-@-prefixed-macros/index.md) (2014-01-10): While writing my own debugging lib, an idea I was toying with was having a debug macro look like one of the built-in @ compiler directives, e.g. @selector, @encode, etc. Since macro names must be … - [My Xcode plug-in to have Clang format/style your code using the new clang-format](http://travisjeffery.com/my-xcode-plug-in-to-have-clang-format/style-your-code-using-the-new-clang-format/index.md) (2014-01-07): Recently added to Clang v3.4 are awesome tools for formatting your code and a new command clang-format. Clang format can style code to guidelines of LLVM, WebKit, Google, Chromium, Mozilla, or you can … - [Text processing with NSLinguisticTagger: implementing Writer Pro's syntax control](http://travisjeffery.com/text-processing-with-nslinguistictagger-implementing-writer-pros-syntax-control/index.md) (2013-12-25): Update: I wrote this code to show that iA was patenting a feature built into Apple’s frameworks. Any iOS developer could build the same feature with ten lines of code. John Gruber linked my project on … - [Preventing 'IB auto generated at build time for view with fixed frame' when using Auto Layout](http://travisjeffery.com/preventing-ib-auto-generated-at-build-time-for-view-with-fixed-frame-when-using-auto-layout/index.md) (2013-11-28): If you’re using Interface Builder with auto layout and go to write some layout constraints in code you may run into the following error - where the constraints you’ve added in code conflict with … - [URL linking in a non-editable NSTextView](http://travisjeffery.com/url-linking-in-a-non-editable-nstextview/index.md) (2013-11-09): You’re likely here because you thought you could just do this: NSTextView *textView = [NSTextView new]; [textView setEditable:NO]; [textView setAutomaticLinkDetectionEnabled:YES]; [textView … - [Using UIImage, UIColor, UIFont Code on Mac OS X](http://travisjeffery.com/using-uiimage-uicolor-uifont-code-on-mac-os-x/index.md) (2013-11-02): This week I switched from working on iOS apps at 37signals to working on a similar mac app. I wanted to shared code between the ios and mac app, this is easy to do with foundation classes - my model … - [Using TextKit to put an image in a text view](http://travisjeffery.com/using-textkit-to-put-an-image-in-a-text-view/index.md) (2013-10-20): Boom goes the dynamite. NSTextAttachment *attachment = [[NSTextAttachment alloc] initWithData:nil ofType:nil]; attachment.image = [UIImage imageNamed:@"whatever"]; NSAttributedString *attributedString … - [How to know when a UIScrollView (includes UITableView, UICollectionView) finished scrolling](http://travisjeffery.com/how-to-know-when-a-uiscrollview-includes-uitableview-uicollectionview-finished-scrolling/index.md) (2013-10-19): UIScrollViewDelegate has the method: -[UIScrollViewDelegate scrollViewDidEndDragging:willDecelerate:], and the decelerate parameter is NO when the scroll view has finished scrolling. So you could use … - [Server-sent event event source API client in ObjC for iOS and Mac using NSURLSession](http://travisjeffery.com/server-sent-event-event-source-api-client-in-objc-for-ios-and-mac-using-nsurlsession/index.md) (2013-10-12): TRVSEventSource provides an api for opening an http connection for receiving push notifications from a server in the form of server-sent events. Mozilla Developer Network has a good page on … - [Async testing with Xcode and any testing framework such as XCTest, SenTestingKit, Expecta, etc.](http://travisjeffery.com/async-testing-with-xcode-and-any-testing-framework-such-as-xctest-sentestingkit-expecta-etc./index.md) (2013-10-11): I wrote TRVSMonitor, a synchronization construct with the ability to wait until signalled that a condition was met. This makes asynchronous testing easy. TRVSMonitor works with any testing framework … - [`git author sha`: get author info for a given sha in git](http://travisjeffery.com/git-author-sha-get-author-info-for-a-given-sha-in-git/index.md) (2013-10-05): When i’m hacking on open source libs i maintain, i often have to clean up the commits of people’s prs. I wanna give attribution for good contributions and not have my name associated with nasty hacks, … - [Xcode attaching to app running in simulator not working](http://travisjeffery.com/xcode-attaching-to-app-running-in-simulator-not-working/index.md) (2013-10-03): If you’re running your app in Xcode and the simulator, they may hang saying Attaching to your app name.... To fix this and run your app in the simulator with the lldb debugger, go into your app’s … - [Basic authentication with AFNetworking 2](http://travisjeffery.com/basic-authentication-with-afnetworking-2/index.md) (2013-09-27): Use -[AFHTTPRequestSerializer setAuthorizationHeaderFieldWithUsername:password:] on -[AFHTTPSessionManager requestSerializer]. For example, in your AFHTTPSessionManager subclass: @implementation … - [Disable microphone muting when typing in Google+ Hangouts](http://travisjeffery.com/disable-microphone-muting-when-typing-in-google-hangouts/index.md) (2013-09-24): In Terminal.app, copy-and-paste and run: defaults write com.google.googletalkplugind exps -string [\"-tm\"] - [Scroll to the bottom of a UICollectionView](http://travisjeffery.com/scroll-to-the-bottom-of-a-uicollectionview/index.md) (2013-09-19): Here ya go. NSInteger section = [self numberOfSectionsInCollectionView:collectionView] - 1; NSInteger item = [self collectionView:collectionView numberOfItemsInSection:section] - 1; NSIndexPath … - [Testing JavaScript projects with Grunt, Jasmine, and JSHint](http://travisjeffery.com/testing-javascript-projects-with-grunt-jasmine-and-jshint/index.md) (2013-09-03): I maintain jasmine-jquery, a library providing jquery matchers and fixture loading for jasmine. Recently, I setup jasmine-jquery with grunt, a javascript task runner. This way, I can run the test … - [Installing Ruby with rbenv and Homebrew on OS X Mavericks](http://travisjeffery.com/installing-ruby-with-rbenv-and-homebrew-on-os-x-mavericks/index.md) (2013-06-24): It’s a bit tricky to install Ruby on Mac OS X Maverick (10.9), but here’s what worked for me. Upgrade to Mavericks: https://itunes.apple.com/us/app/os-x-mavericks/id675248567 Upgrade to Xcode 5: … - [When Google Chrome won't open iTunes links](http://travisjeffery.com/when-google-chrome-wont-open-itunes-links/index.md) (2013-06-04): Recently ran into this issue where Google Chrome wouldn’t open iTunes links (e.g. links to WWDC videos, iOS apps, songs, etc.), a while ago I’d set Chrome to remember not open those links (oops). … - [Getting the status bar's height in iOS](http://travisjeffery.com/getting-the-status-bars-height-in-ios/index.md) (2013-05-06): I had someone ask me for the best way to get the status bar’s height. Their problem was they were using UIApplication-statusBarFrame.size.height which will usually be 20.0f when in portrait (but would … - [Converting AVFoundation's power levels to/from logarithmic and linear scale](http://travisjeffery.com/converting-avfoundations-power-levels-to/from-logarithmic-and-linear-scale/index.md) (2013-02-08): When using AVFoundation, you’ll notice that the numbers returned when checking the audio channel power levels may look kind of strange. The audio levels returned to you when calling … - [Notify yourself of successful/failed Xcode builds by email](http://travisjeffery.com/notify-yourself-of-successful/failed-xcode-builds-by-email/index.md) (2013-01-17): Compiling sucks, for the most part, and while it’s getting better with smarter compilers and faster computers this is what it often feels like: So instead of sitting there, you head over to the … - [Overriding UIViewController's view property, done right](http://travisjeffery.com/overriding-uiviewcontrollers-view-property-done-right/index.md) (2012-12-28): I read a lot of code, and some of the most common mistakes I see is how people override UIViewController’s view property. Here’s how it should be done, in this example we’re replacing … - [Quick staging and other file operations in git](http://travisjeffery.com/quick-staging-and-other-file-operations-in-git/index.md) (2012-11-01): Having a modular and well-organized code is clearly great from an architectural standpoint, but it can make the actual filesystem layout and hierarchy of your project a little complex, now that text … - [Making Custom Transitions Between UIViewControllers](http://travisjeffery.com/making-custom-transitions-between-uiviewcontrollers/index.md) (2012-10-22): I released a project called TRVSNavigationControllerTransition. The project adds convenient methods to translate the entire UINavigationController’s view while pushing and popping UIViewControllers to … - [Alias in ZSH with completion](http://travisjeffery.com/alias-in-zsh-with-completion/index.md) (2012-08-08): I use git in a terminal all day, every day. 3 characters adds up if you type them enough, g i t, so let’s shorten what we have to type. You shorten a command by making a shorter alias. So I alias g to … - [iOS how-to: mask and shadow views](http://travisjeffery.com/ios-how-to-mask-and-shadow-views/index.md) (2012-08-06): Two techniques that iOS developers use to make visually appealing app are masks and shadows; for example, masking an image to have round corners, or adding a drop shadow to an image to have depth. … - [Adding a drop shadow to a table view](http://travisjeffery.com/adding-a-drop-shadow-to-a-table-view/index.md) (2012-07-23): Recently I was implementing a view where the last cell of a table view needed a drop shadow. The idea of the implementation was to use the shadow properties on the table cell’s Core Animation layer to … - [Getting the index path of a table view cell via a subview event](http://travisjeffery.com/getting-the-index-path-of-a-table-view-cell-via-a-subview-event/index.md) (2012-07-22): You’ve subclassed UITableViewCell and you’ve added a UIButton as a subview. Whenever you touch that button, you want to act on the data of your UITableView. To act on the data, you need to know the … - [Rendering errors with JSON and Rails](http://travisjeffery.com/rendering-errors-with-json-and-rails/index.md) (2012-04-27): I’ve seen bad practices for handling errors with JSON and Rails: Not using proper HTTP statuses; Not using the error callback; and Making errors message building harder than necessary. Let’s look at … - [How-to test starting Backbone's history](http://travisjeffery.com/how-to-test-starting-backbones-history/index.md) (2012-04-16): You can call Backbone.history.start() once. Multiple calls causes Backbone to throw an Error saying: “Backbone.history has already been started”. You’ll hit this error when testing, if you have each … - [Web Inspector's new dock to right feature](http://travisjeffery.com/web-inspectors-new-dock-to-right-feature/index.md) (2012-04-01): Chrome released a new Web Inspector feature called Dock to right. This feature allows you to vertically split your screen, with your web page on the left, and Web Inspector tools on the right. If you … - [errors.js: client side errors object](http://travisjeffery.com/errors.js-client-side-errors-object/index.md) (2012-03-30): I like ActiveModel’s Errors object. It simple, ubiquitous, consistent, and makes it easy to handle your models’ errors, server-side. However, we’re deep into the web developers’ great migration to the … - [What is this? I don't even... bind this to your object in JavaScript!](http://travisjeffery.com/what-is-this-i-dont-even...-bind-this-to-your-object-in-javascript/index.md) (2012-03-29): In JavaScript, the this keyword refers to the object it belongs to, and the object depends on where you use it. In a method: this refers to the owner object. In a function: this refers to the global … - [JavaScript conditional assignment](http://travisjeffery.com/javascript-conditional-assignment/index.md) (2012-03-20): Ruby has a conditional assignment operator: ||=. JavaScript doesn’t have such an operator. Common use cases for conditional assignment that JavaScript developers use are lazily defining a namespace … - [Generate Rails migrations that automagically add your change](http://travisjeffery.com/generate-rails-migrations-that-automagically-add-your-change/index.md) (2012-03-16): Rails’ generators can pump out code and save you from tedious work. This command generates a person model with a name and age: rails g model person name:string age:integer When you generator a decimal … - [Using git's include for private configuration information (like github tokens)](http://travisjeffery.com/using-gits-include-for-private-configuration-information-like-github-tokens/index.md) (2012-03-09): Git added a feature that enables you to split your Git config across multiple files. I store my dotfiles in a public Git repo but I had to exclude my .gitconfig file because it contained by GitHub … - [Find Rails partial references in Vim](http://travisjeffery.com/find-rails-partial-references-in-vim/index.md) (2012-02-23): Before I change a Rails partial that’s shared across the project, I check what effect my change will have by looking at where and how the partial’s used. In Vim, I find the references to partials with … - [Using PostgreSQL's Hstore with Rails](http://travisjeffery.com/using-postgresqls-hstore-with-rails/index.md) (2012-02-20): Prelude Recently I implemented a piece of functionality that used PostgreSQL’s hstore data type in a Rails application and I’d like to share how we did it including some improvements you can make to … - [Vim and the power of :g](http://travisjeffery.com/vim-and-the-power-of-g/index.md) (2012-02-17): Vim’s :g takes two inputs: a pattern and an operation, and it runs that operation on each line that matches the pattern in the current file. :g is a tool whose usage isn’t imposed on you, nor obvious … - [Modern grep](http://travisjeffery.com/modern-grep/index.md) (2012-02-09): Update: I updated the post for ripgrep. grep reigned as the preeminent text search tool for a long time. Yet grep’s overly unopinionated approach to defaults and maintaining backwards compatibility … - [Search a git repo like a ninja](http://travisjeffery.com/search-a-git-repo-like-a-ninja/index.md) (2012-02-02): $ git grep Try it out on a project, then try the same search with ack and grep and you see that we have speed that’s better than either grep or ack. But we can make some improvements: Allow … - [ZSH's extended glob breaking commands](http://travisjeffery.com/zshs-extended-glob-breaking-commands/index.md) (2012-01-30): After running a command like $ rake new_post["hello world"], you may have seen an error like the following: zsh: no matches found: new_post[...] The issue is that you have ZSH’s extended glob turned … - [Hide comments with Vim folding](http://travisjeffery.com/hide-comments-with-vim-folding/index.md) (2012-01-17): No matter how clean your code is, you need to document your code. Nothing can be quite so helpful as a well-placed comment. Nothing can clutter up a module more than frivolous dogmatic comments. … - [Building regexps in JavaScript](http://travisjeffery.com/building-regexps-in-javascript/index.md) (2012-01-05): If you need to build a JavaScript RegExp from multiple strings or regexps, dynamically, here’s how: var re = new RegExp("some string" + /some.*(re)/.source); "some string some re".match(re); This … - [Expressive domain specific languages (DSL) in Ruby](http://travisjeffery.com/expressive-domain-specific-languages-dsl-in-ruby/index.md) (2011-12-28): I’ve experimented with making DSLs in Ruby and here’s an example: class User def initialize &block if block.arity == 1 block[self] else instance_eval &block end end def name new_name = nil @name ||= … - [Keeping your git repo clean of .orig files!](http://travisjeffery.com/keeping-your-git-repo-clean-of-.orig-files/index.md) (2011-12-03): For teams building projects with Git, a good habit is to rebase and merge often so conflicts are less frequent and easier to resolve. Also, this helps keeps your branch graph simple. When people have … - [Saving files in nonexistent directories with Vim](http://travisjeffery.com/saving-files-in-nonexistent-directories-with-vim/index.md) (2011-11-28): I often open a file in a directory that doesn’t exist yet. However, Vim will not let you save a file in a nonexistent directory. You can manually create the directory by running the following command: … - [Markdown headers in Vim](http://travisjeffery.com/markdown-headers-in-vim/index.md) (2011-11-18): With TextMate’s Markdown bundle, you can mark headers by moving your cursor to the line after the intended header, typing # and pressing . The Textmate bundle insert #’s until the last # aligns … - [Mess up a rebase? Reflog your problems away](http://travisjeffery.com/mess-up-a-rebase-reflog-your-problems-away/index.md) (2011-10-31): I’m going to show you how to use the reflog to fix mistakes you’ve made with Git, where you seemingly can’t recover the history. People fear Git, fear making a mistake that ruins their repo, and fear … - [M-x occur for Vim](http://travisjeffery.com/m-x-occur-for-vim/index.md) (2011-10-31): Emacs has a feature named “occur” that lists the lines in the current buffer that match a given regexp. I’ve created the equivalent feature in Vim: nmap g/ :vimgrep ///j %\|:cw With this … - [Hello. Yes, this is blog.](http://travisjeffery.com/hello.-yes-this-is-blog./index.md) (2011-10-29): Stay tuned!