start new:
tmux
start new with session name:
tmux new -s myname
| var linkify = (function() { | |
| var replaceSubstr = function(text, i, j, substr) { | |
| return text.substr(0, i) + substr + text.substr(j); | |
| } | |
| var mergeByIndices = function(a, b) { | |
| var i = 0, j = 0, result = []; | |
| while (i < a.length || j < b.length) { | |
| if (i < a.length && (j >= b.length || a[i].indices[0] < b[j].indices[0])) | |
| result.push(a[i++]); |
| // Copyright (C) 2012 Benoit Sigoure | |
| // Copyright (C) 2012 StumbleUpon, Inc. | |
| // This library is free software: you can redistribute it and/or modify it | |
| // under the terms of the GNU Lesser General Public License as published by | |
| // the Free Software Foundation, either version 2.1 of the License, or (at your | |
| // option) any later version. This program is distributed in the hope that it | |
| // will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty | |
| // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser | |
| // General Public License for more details. You should have received a copy | |
| // of the GNU Lesser General Public License along with this program. If not, |
| // ==UserScript== | |
| // @name Trello Activity | |
| // @namespace http://fluidapp.com | |
| // @description Displays a Growl notification for new activities every 5 seconds. Also updates the badge. | |
| // @include * | |
| // @author Michael Lopez (michael@weahead.se) | |
| // ==/UserScript== | |
| (function () { | |
| if (window.fluid) { |
| module Sencha | |
| module NestedListMenu | |
| class << self | |
| # Sencha Touch nested list menu requires json in the form of: | |
| # | |
| # {"text": "some identifier", | |
| # "children": ["text": "child identifier", "other": "info", "leaf": "true"], | |
| # [ ... ] | |
| # }, | |
| # { ... } |
| var express = require('express') | |
| , cookieSessions = require('./cookie-sessions'); | |
| var app = express(); | |
| app.use(express.cookieParser('manny is cool')); | |
| app.use(cookieSessions('sid')); | |
| app.get('/', function(req, res){ | |
| req.session.count = req.session.count || 0; |
| var express = require('express'), | |
| requirejs = require('requirejs'), | |
| app = module.exports = express.createServer(); | |
| app.configure('development', function(){ | |
| // Use development version of static files | |
| app.use(express.static(__dirname + '/public')); | |
| }); | |
| app.configure('production', function(){ |
| // Require libraries | |
| var os = require("os"); | |
| var fs = require("fs"); | |
| var readline = require("readline"); | |
| var cluster = require("cluster"); | |
| var express = require("express"); | |
| var site = express(); | |
| // Var up, bro | |
| var i, read; |
| <?php | |
| require 'autoload.php'; | |
| $redis = new Predis\Client('tcp://127.0.0.1', 'dev'); | |
| // *** NOTE *** Lua's unpack() has a limit on the size of the table imposed by | |
| // the number of Lua stack slots that a C function can use. This value is defined | |
| // by LUAI_MAXCSTACK in luaconf.h and for Redis is set to 8000, which translates | |
| // to an hash of 4000 elements since HGETALL returns a list that interleaves field |
| #!/bin/sh | |
| ##3.5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80 | |
| ## | |
| ## Debian / Linux / Ubuntu / LSB | |
| ## Startup script for Express / Node.js application with the forever module | |
| ## | |
| ## | |
| ## A modification of "init.d.lsb.ex" by Nicolas Thouvenin | |
| ## | |
| ## |