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
// http://bit.ly/qDefer | |
$(function(){$('script[type="text/javascript/defer"]').each(function(){$(this).clone().attr('type','').insertAfter(this)})}); |
# | |
# 12.0.6 ARMv5 sf | |
# | |
$ java -agentpath:/home/pi/yourkit/yjp-12.0.6/bin/linux-armv5-sf/libyjpagent.so | |
Error occurred during initialization of VM | |
Could not find agent library /home/pi/yourkit/yjp-12.0.6/bin/linux-armv5-sf/libyjpagent.so in absolute path, with error: /home/pi/yourkit/yjp-12.0.6/bin/linux-armv5-sf/libyjpagent.so: cannot open shared object file: No such file or directory | |
$ file /home/pi/yourkit/yjp-12.0.6/bin/linux-armv5-sf/libyjpagent.so | |
/home/pi/yourkit/yjp-12.0.6/bin/linux-armv5-sf/libyjpagent.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, stripped |
# This file has been auto-generated by i3-config-wizard(1). | |
# It will not be overwritten, so edit it as you like. | |
# | |
# Should you change your keyboard layout some time, delete | |
# this file and re-run i3-config-wizard(1). | |
# | |
# i3 config file (v4) | |
# | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! |
#!/bin/sh | |
# | |
# This script installs a virtual desktop using Xvfb, x11vnc, mate-desktop, | |
# mate-session-manager and Apache Guacamole. It runs on Alpine Linux Edge. | |
# | |
# See also: | |
# https://www.reddit.com/r/selfhosted/comments/b6k8go/poc_a_desktop_in_a_container_on_a_server/ | |
# This is the user, under which the MATE desktop will run | |
# Notice: For several reasons this shouldn't be root |
server: | |
########################################################################### | |
# BASIC SETTINGS | |
########################################################################### | |
# Time to live maximum for RRsets and messages in the cache. If the maximum | |
# kicks in, responses to clients still get decrementing TTLs based on the | |
# original (larger) values. When the internal TTL expires, the cache item | |
# has expired. Can be set lower to force the resolver to query for data | |
# often, and not trust (very large) TTL values. | |
cache-max-ttl: 86400 |
--- | |
# I want to verify that /dev/pts is mounted, and if not, mount it. | |
# Manually, this is simply: mount devpts /dev/pts -t devpts | |
# I want the resulting playbook to be idempotent and support the --check flag | |
- hosts: test | |
remote_user: testroot | |
tasks: | |
# The simple "command" way to do this. |
{ config, pkgs, ... }: | |
let | |
# Import unstable channel. | |
# sudo nix-channel --add http://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable | |
# sudo nix-channel --update nixpkgs-unstable | |
unstable = import <nixpkgs-unstable> {}; | |
in | |
{ |
(defun rk/open-compilation-buffer (&optional buffer-or-name shackle-alist shackle-plist) | |
"Helper for selecting window for opening *compilation* buffers." | |
;; find existing compilation window left of the current window or left-most window | |
(let ((win (or (loop for win = (if win (window-left win) (get-buffer-window)) | |
when (or (not (window-left win)) | |
(string-prefix-p "*compilation" (buffer-name (window-buffer win)))) | |
return win) | |
(get-buffer-window)))) | |
;; if the window is dedicated to a non-compilation buffer, use the current one instead | |
(when (window-dedicated-p win) |
/** | |
* Get an array containing the text nodes within a DOM node. | |
* | |
* From http://stackoverflow.com/a/4399718/843621 | |
* | |
* For example get all text nodes from <body> | |
* | |
* var body = document.getElementsByTagName('body')[0]; | |
* | |
* getTextNodesIn(body); |