Skip to content

Instantly share code, notes, and snippets.

All of these resources were extremely valuable as I researched regex, finite state machines, and regex in Ruby. Check them out, they're full of fantastic information!
Articles
"Exploring Ruby's Regular Expression Algorithm" by Pat Shaughnessy
http://patshaughnessy.net/2012/4/3/exploring-rubys-regular-expression-algorithm
"Finite State Machines and Regular Expressions" by Eli Bendersky
http://www.gamedev.net/page/resources/_/technical/general-programming/finite-state-machines-and-regular-expressions-r3176
"Regular Expression Matching Can Be Simple and Fast" by Russ Cox

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@orendon
orendon / Gemfile
Created December 14, 2013 18:12 — forked from pcreux/Gemfile
group :production do
gem 'unicorn'
# Enable gzip compression on heroku, but don't compress images.
gem 'heroku-deflater'
# Heroku injects it if it's not in there already
gem 'rails_12factor'
end
# Usage: redis-cli publish message hello
require 'sinatra'
require 'redis'
conns = []
get '/' do
erb :index
end
#!/usr/bin/env ruby
require 'rss'
subscriber_id = "41TjtXC14dnMq0aFyllyKw"
download_dir = "/srv/http/data.ineu.pp.ua/shared/public/system/railscasts"
url = "http://railscasts.com/subscriptions/#{subscriber_id}/episodes.rss"
feed = RSS::Parser.parse(url)
require 'net/http'
require 'pry'
class RailscastsScanner
end
uri = URI("http://railscasts.com/episodes/407")
Net::HTTP.start uri.host, uri.port do |http|
resp = http.head uri.path
@orendon
orendon / Install_tmux
Last active January 4, 2016 17:09 — forked from simme/Install_tmux
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@orendon
orendon / sublime-keymap
Created February 4, 2014 16:57
Custom sublime-keymap
[
{ "keys": ["ctrl+k", "ctrl+m"], "command": "toggle_minimap" }
]
@orendon
orendon / tmux.conf
Last active August 29, 2015 13:56
Some extra configs for my current vim and tmux setup
# change bind to ctrl+a
unbind C-b
set -g prefix C-a
# switch pane alt+arrow
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D