start new:
tmux
start new with session name:
tmux new -s myname
# Single-line version: | |
(?i)\b((?:https?:(?:/{1,3}|[a-z0-9%])|[a-z0-9.\-]+[.](?:[a-z]{2,13})(?:[^\s()<>{}\[\]]+|\([^\s()]*?\([^\s()]+\)[^\s()]*?\)|\([^\s]+?\))+(?:\([^\s()]*?\([^\s()]+\)[^\s()]*?\)|\([^\s]+?\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])|(?:(?<!@)[a-z0-9]+(?:[.\-][a-z0-9]+)*[.](?:[a-z]{2,13})\b/?(?!@))) | |
# Commented multi-line version: | |
(?xi) | |
\b | |
( # Capture 1: entire matched URL | |
(?: |
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below) | |
module Player | |
describe MovieList, "with optional description" do | |
it "is pending example, so that you can write ones quickly" | |
it "is already working example that we want to suspend from failing temporarily" do | |
pending("working on another feature that temporarily breaks this one") |
#!/usr/bin/env ruby | |
# Translates an objective C method call on the pasteboard, | |
# as copied from the docs, into MacRuby syntax, placing it | |
# back on the pasteboard. | |
# @example | |
# '+ (NSColor *)colorWithCalibratedRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha' | |
# => 'colorWithCalibratedRed(red, green:green, blue:blue, alpha:alpha)' | |
string = `pbpaste` |
#! /usr/bin/env python | |
""" Convert values between RGB hex codes and xterm-256 color codes. | |
Nice long listing of all 256 colors and their codes. Useful for | |
developing console color themes, or even script output schemes. | |
Resources: | |
* http://en.wikipedia.org/wiki/8-bit_color | |
* http://en.wikipedia.org/wiki/ANSI_escape_code |
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# == Synopsis | |
# Requires the terminal-notifier gem ([sudo] gem install terminal-notifier) | |
# growlnotify wrapper to turn Growl alerts into Mountain Lion notifications | |
# Uses growlnotify option syntax to keep your old scripts working with the new shiny. | |
# | |
# If you use Growl via growlnotify in your shell scripting, this script | |
# will replace Growl's alerts with Mountain Lion notifications. |
#!/usr/bin/env bash | |
# Bash Stack | |
set -o errtrace | |
set -o errexit | |
set -o nounset | |
declare -a stack |