Skip to content

Instantly share code, notes, and snippets.

@mattdsteele
mattdsteele / gist:5615925
Last active October 30, 2016 12:18
Quirks in DeviceOrientation API
@apk
apk / websock.sh
Created April 18, 2012 15:51
A web socket server as a bash script.
#!/bin/bash
# WebSocket shell, start & browse to http://<Host>:6655/
# Requires bash 4.x, openssl.
# Author: rootshell@corelogics.de (which isn't me, apk)
coproc d { nc -l -p 6656 -q 0; }
nc -l -p 6655 -q 1 > /dev/null <<-ENDOFPAGE
HTTP/1.1 200 OK
<html><head><script language="javascript">
var url = location.hostname + ':' + (parseInt(location.port) + 1);
;;; undo-tree.el --- Treat undo history as a tree
;; 2010/2/15 追記.
;; undo-tree-visualizer-quit のバグを修正しました.
;; 参考) http://d.hatena.ne.jp/kitokitoki/20100211/p1
;; オリジナルからの変更点
;; 1. q で *undo-tree* があったウィンドウも削除し,呼び出しもとのウィンドウ・バッファにポイントを移動
;; 2. 上下分割から左右分割に変更