This is a SCRIPT-8 cassette.
# Source: https://gist.github.com/RichardBronosky/56d8f614fab2bacdd8b048fb58d0c0c7 | |
# Linux | |
_copy(){ | |
cat | xclip -selection clipboard | |
} | |
_paste(){ | |
xclip -selection clipboard -o | |
} |
(defn- try-tagged-template | |
[tag-test catch-symbol & body] | |
(let [catch-tagged-form (last body) | |
[catch-sym ex tag data-sym & catch-body] catch-tagged-form] | |
(s/validate [(s/one (s/eq catch-symbol) 'catch) | |
(s/one s/Symbol 'exception-binding) | |
(s/one s/Keyword 'tag) | |
(s/one s/Symbol 'ex-data-binding)] | |
[catch-sym ex tag data-sym]) | |
`(let [tag-test# ~tag-test |
javascript:(function(){ | |
function encode (s) { | |
s = s.toString (); | |
s = s.replace (new RegExp (/" %"/, "g"), " percent"); | |
return (encodeURIComponent(s)); | |
} | |
var url="http://radio3.io/?"; | |
var link = "link=" + encode(location.href); | |
var title="&title=" + (document.title); | |
var desc="&description=" + (document.getSelection()); |
sudo apt-get install git-core build-essential | |
sudo apt-get install libncurses5-dev libpcap-dev libpcre3-dev libnl-dev libmicrohttpd12 libmicrohttpd-dev | |
wget http://kismetwireless.net/code/kismet-2016-07-R1.tar.xz | |
tar -xvf kismet-2016-07-R1.tar.xz | |
cd kismet-2016-07-R1 | |
./configure | |
make | |
sudo make suidinstall | |
sudo groupadd kismet | |
sudo usermod -a -G kismet pi |
var options = { | |
'url': '/foo/bar/' | |
} | |
var inlineCss = require('inline-css') | |
var fs = require('fs') | |
fs.readFile('/Users/foo/Downloads/index.htm', 'utf8', function (err, data){ | |
if (err){ | |
return console.log(err); | |
} | |
inlineCss(data, options).then(function(html) { |
all: txtfile | |
TARGET_DIR = target-dir | |
txtfile: $(TARGET_DIR) | |
touch $(TARGET_DIR)/file.txt | |
target-dir: | |
test ! -d $(TARGET_DIR) && mkdir $(TARGET_DIR) |
[ | |
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} }, | |
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} }, | |
{ "keys": ["shift+end"], "command": "move_to", "args": { "to": "eol", "extend": true } }, | |
{ "keys": ["shift+home"], "command": "move_to", "args": { "to": "bol", "extend": true } } | |
] |
;; https://groups.google.com/forum/#!topic/clojure/JgxFQLP2E34 | |
:jvm-opts ^:replace ["-server" | |
;;"-XX:+AggressiveOpts" | |
;;"-XX:+UseFastAccessorMethods" | |
;;"-XX:+UseCompressedOops" | |
"-Xmx4g"] |
(published May 24, 2010, blog no longer exists)
Years ago I saw a really good talk by Rob Pike about a little known language called Newsqueak. I can’t remember if I had anything more than a mild interest in concurrent programming, but that talk got my attention. I read all I could find about concurrency in Newsqueak. Fun ideas are fun to play with.
I wrote a short article about channels
, which are Newsqueak’s construct for synchronization between threads. I tried to emulate behavior of channels in C# via locking and signaling. I was aware that there probably is no 1:1 mapping between what Newsqueak calls processes and managed threads in .NET (though I’m not sure to this day how many processes could Newsqueak spawn before bringing machine to a halt) but the exercise was fun enough to do it anyway.
Now, this was long enough ago, that C# didn’t have syntax for lambdas and was