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
| /* | |
| Custom style for Wordpress Highlight.js plugin. | |
| By Johan Brook (dark on light colours). | |
| */ | |
| pre code { | |
| color: #c4cdc5; | |
| } |
| # Git Emacs 24 from the main Savannah (savannah.gnu.org) repository and apply typester's fullscreen patch | |
| rm -fr emacs | |
| git clone git://git.savannah.gnu.org/emacs.git | |
| cd emacs | |
| wget http://cloud.github.com/downloads/typester/emacs/feature-fullscreen.patch | |
| patch -p1 -i feature-fullscreen.patch | |
| cd .. | |
| curl -O http://ftp.gnu.org/gnu/m4/m4-1.4.13.tar.gz | |
| tar -xzvf m4-1.4.13.tar.gz | |
| cd m4-1.4.13 |
| <!-- ====================================================================== --> | |
| <script> | |
| function onLoad() { | |
| var weinre = 'http://www.example.com/' // <- change to your weinre server base URL | |
| var id = 'testing-1-2-3' | |
| var targetURL = weinre + 'client#' + id | |
| var clientURL = weinre + 'demo/weinre-demo.html#' + id | |
| document.getElementById('target').src = targetURL |
| self.startButton.rac_command = [RACCommand command]; | |
| self.stopButton.rac_command = [RACCommand command]; | |
| __unsafe_unretained id weakSelf = self; | |
| id<RACSignal> tick = [[[[self.startButton.rac_command | |
| map:^(id _) { | |
| RTAFirstView *strongSelf = weakSelf; | |
| // Map each start button click to a new signal that fires every second | |
| // and stops when the stop button is clicked. | |
| return [[RACSignal interval:1] takeUntil:strongSelf.stopButton.rac_command]; |
When VPNs Just Work™, they're a fantastic way of allowing access to a private network from remote locations. When they don't work it can be an experience in frustration. I've had situations where I can connect to a VPN from my Mac, but various networking situations cause routing conflicts. Here are a couple of cases and how I've been able to get around them.
In this example the VPN we are connecting to has a subnet that does not conflict with our local IP, but has additional routes that conflict in some way with our local network's routing. In my example the remote subnet is 10.0.x.0/24, my local subnet is 10.0.y.0/24, and the conflicting route is 10.0.0.0/8. Without the later route, I can't access all hosts on the VPN without manually adding the route after connecting to the VPN:
| Alice's Adventures in Wonderland | |
| ALICE'S ADVENTURES IN WONDERLAND | |
| Lewis Carroll | |
| THE MILLENNIUM FULCRUM EDITION 3.0 | |
| # MAC manipulators | |
| alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`' | |
| alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE' |
| { | |
| /* Keybindings for emacs emulation. Compiled by Jacob Rus. | |
| * | |
| * This is a pretty good set, especially considering that many emacs bindings | |
| * such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and | |
| * perhaps a few more, are already built into the system. | |
| * | |
| * BEWARE: | |
| * This file uses the Option key as a meta key. This has the side-effect | |
| * of overriding Mac OS keybindings for the option key, which generally |