Skip to content

Instantly share code, notes, and snippets.

Koen Rouwhorst koenrh

View GitHub Profile
View sequel_playground.rb
#!/usr/bin/env ruby
require 'sequel'
require 'logger'
require 'awesome_print'
DB = Sequel.sqlite
DB.create_table :people do
primary_key :id
String :name
@ryanblock
ryanblock / @ryan tweetbot regex.md
Created Aug 29, 2012
How Tweetbot and regex made my Twitter replies usable again (filed under: #wrongryan)
View @ryan tweetbot regex.md

How Tweetbot and regex made my Twitter replies usable again

As it turns out, most normal humans are incapable of learning to use Twitter @ replies. And in case you don't follow me on Twitter: yes, my handle (@ryan) gets a lot of erroneous mentions. (The most amusing, random ones I've even taken to retweeting under the #wrongryan hashtag.)

Then Tweetbot -- and its ability to use regex as Twitter filters -- came along. Here's how the Tapbots guys and some regular expressions single-handedly made my Twitter replies usable again.

Notes and caveats

  • I'm not a regex expert. Far from it. I suck at regex, actually. If you have suggestions for improvements, please leave them below!
  • Some regex may look a little sloppy, but in actuality was written because TweetBot for Mac's regex filter support is very early, and things like repeats (expression{3,}) are buggy. So everything below should work without crashing Tweetbot for iPhone, iPad, and Mac.
  • Obvious, but not everyone should make use of every filter b
You can’t perform that action at this time.