As configured in my dotfiles.
start new:
tmux
start new with session name:
| #!/bin/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
| # encoding: utf-8 | |
| module Constants | |
| JSON_VALIDATOR_RE = /( | |
| # define subtypes and build up the json syntax, BNF-grammar-style | |
| # The {0} is a hack to simply define them as named groups here but not match on them yet | |
| # I added some atomic grouping to prevent catastrophic backtracking on invalid inputs | |
| (?<number> -?(?=[1-9]|0(?!\d))\d+(\.\d+)?([eE][+-]?\d+)?){0} | |
| (?<boolean> true | false | null ){0} | |
| (?<string> " (?>[^"\\\\]* | \\\\ ["\\\\bfnrt\/] | \\\\ u [0-9a-f]{4} )* " ){0} |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| // Ruby = 5.times { |i| puts i } | |
| // JS = (1).times(function(i){console.log(i);}) | |
| Number.prototype.times = function(cb) { | |
| var i = -1; | |
| while (++i < this) { | |
| cb(i); | |
| } | |
| return +this; |
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.
| # recursively delete original files after a git merge failure | |
| find . -name *.orig -delete |
| ## Prepare ################################################################### | |
| # Remove RVM | |
| rvm implode | |
| # Ensure your homebrew is working properly and up to date | |
| brew doctor | |
| brew update | |
| ## Install ################################################################### |
| # inspired by http://ariejan.net/2010/08/23/resque-how-to-requeue-failed-jobs | |
| # retry all failed Resque jobs except the ones that have already been retried | |
| # This is, for instance, useful if you have already retried some jobs via the web interface. | |
| Resque::Failure.count.times do |i| | |
| Resque::Failure.requeue(i) unless Resque::Failure.all(i, 1)['retried_at'].present? | |
| end | |
| # retry all :) | |
| Resque::Failure.count.times do |i| |
| // ==UserScript== | |
| // @name GitHub Dashboard Twitter | |
| // @namespace http://tekkub.net/ | |
| // @include https://github.com/ | |
| // ==/UserScript== | |
| $("div.news h1").before( | |
| $("<div>").attr("id", "twitter_div2").append( | |
| $("<h1>").text("GitHub status ").css({ |