This is a simple chat-like program using pub-sub pattern, backed by PostgreSQL's LISTEN/NOTIFY command.
publish message to foo channel from user nickname.
$ python pub.py foo nickname
PUBLISH to channel #foo
The spec has moved to a repo: https://github.com/defunctzombie/package-browser-field-spec to facilitate collaboration.
| license: gpl-3.0 |
| <!DOCTYPE> | |
| <html> | |
| <head> | |
| <title>Dissecting Gmail's Email Attachments - Dropping Files</title> | |
| <style> | |
| .msg { | |
| display: none | |
| } | |
| .dragging .msg { |
| license: gpl-3.0 |
| if (window.addEventListener) { | |
| window.addEventListener("storage", onStorage, false); | |
| } else { | |
| window.attachEvent("onstorage", onStorage); | |
| }; | |
| var onStorage = function(data) { | |
| // Receive changes in the localStorage | |
| } |
I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).
In Vim I have key bindings C-h/j/k/l set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W.) I'd like to use the same keystrokes for switching tmux panes.
An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\.
Here's how it should work:
| set-window-option -g utf8 on | |
| set -g mode-mouse on | |
| set -g mouse-resize-pane on | |
| set -g mouse-select-pane on | |
| set -g mouse-select-window on | |
| set-option -g prefix C-q | |
| set -g history-limit 50000 | |
| unbind-key C-b | |
| bind-key q send-prefix | |
| set -g base-index 1 |
| (function (window, app, undefined) { | |
| 'use strict'; | |
| app.factory('socket', ['$rootScope', function ($rootScope) { | |
| var socket = $rootScope.socket; | |
| var onCallback = function (callback, args) { | |
| $rootScope.$apply(function () { | |
| callback.apply(socket, args); |
| // Make sure the socket is coming from our app by matching the session id | |
| socketServer.set('authorization', function (data, accept) { | |
| cookieParser(data, {}, function(err) { | |
| if (err) { | |
| accept(err, false); | |
| } else { | |
| config.sessionStore.load(data.signedCookies[config.sessionKey], function(err, session) { | |
| if (err || !session) { | |
| accept('Session error', false); | |
| } else { |