Skip to content

Instantly share code, notes, and snippets.

@kanaka
kanaka / Flip_Red_Blue.patch
Created July 14, 2011 23:12
noVNC flip red/blue test for VMWare VNC server
diff --git a/include/display.js b/include/display.js
index d7aa43f..55a7aab 100644
--- a/include/display.js
+++ b/include/display.js
@@ -247,13 +247,13 @@ flush = function() {
};
setFillColor = function(color) {
- var rgb, newStyle;
+ var bgr, newStyle;
@kanaka
kanaka / project.clj
Created November 12, 2011 21:13
clojure+libvirt project.clj
(defproject libvirt-experiment "1.0.0-SNAPSHOT"
:description "Using Libvirt from Clojure "
:dependencies [[org.clojure/clojure "1.2.1"]
[net.java.dev.jna/jna "3.3.0"]
[org.libvirt/libvirt "0.4.7"]]
:dev-dependencies [[swank-clojure "1.3.0-SNAPSHOT"]])
@kanaka
kanaka / libvirt.clj
Created November 12, 2011 21:14
Clojure+libvirt quick test
(import '(org.libvirt Connect))
(def c (Connect. "test:///default", true))
(def dom (.domainLookupByName c "test"))
(.getName dom)
(.getID dom)
(.getXMLDesc dom 0)
(.getInfo dom)
(defn di [^org.libvirt.DomainInfo x]

This is a test of the PBS

Works great with Gist: The Website.

Installation

homebrew:

@kanaka
kanaka / hybi7_8.diff
Created March 2, 2012 12:57
WebSocket HyBi 7 vs HyBi 8 handshake
3c3
< User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:6.0.2) Gecko/20100101 Firefox/6.0.2
---
> User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
9c9
< Sec-WebSocket-Version: 7
---
> Sec-WebSocket-Version: 8
12c12,13
< Sec-WebSocket-Key: sJ95uhdrfjyOeL8+LxFLYw==
@kanaka
kanaka / scboot
Created May 21, 2012 18:35
scboot
#!/bin/bash
# $Id: scboot 64763 2008-11-15 14:29:58Z rwoodscorwin $
usage() {
echo "
Usage: $(basename $0) [options]
Boot the nodes of a SiCortex system.
ARG ENV VARIABLE DESCRIPTION
@kanaka
kanaka / gist:3989720
Created October 31, 2012 20:40
test_zz_websocket_bi debug output
hello from main page
onmessage,http://localhost:8888/test.html,[object Uint8Array],19,|,91,111,98,106,101,99,116,32,85,105,110,116,56,65,114,114,97,121,93
pre-recv: 1024,19,0
recv: 19 : 0,0,104,101,108,108,111,32,102,114,111,109,32,109,97,105,110,32,112,97,103,101,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@kanaka
kanaka / gist:3989748
Created October 31, 2012 20:44
debug output from test_zz_websocket_bi_bigdata
hello from main page
so far 0, expecting up to 131072
so far 0, expecting up to 131072
read! 19
so far 19, expecting up to 131053
so far 19, expecting up to 131053
so far 19, expecting up to 131053
so far 19, expecting up to 131053
so far 19, expecting up to 131053
so far 19, expecting up to 131053
@kanaka
kanaka / gist:3989764
Created October 31, 2012 20:48
Output from OS side running test_zz_websockets_bi
$ python tests/runner.py browser.test_zz_websockets_bi
Running the browser tests. Make sure the browser allows popups from localhost.
(Emscripten: Running sanity checks)
WARNING: Not all the JS engines in JS_ENGINES appears to work, ignoring those.
[Browser harness server on process 15695]
test_zz_websockets_bi (__main__.browser) ... creating relay server on ports 8992,8994
listener binding to 8992
listener binding to 8994
@kanaka
kanaka / gist:3989833
Created October 31, 2012 21:02
test_zz_websocket_bi side.html debug output
connect..
send..
sender,[object Uint8Array],28,|,104,101,108,108,111,32,102,114,111,109,32,116,104,101,32,111,116,104,101,114,32,115,105,105,100,101,10,0
stall..