Skip to content

Instantly share code, notes, and snippets.

@bitemyapp
bitemyapp / gist:8739525
Last active May 7, 2021 23:22
Learning Haskell
@jmpinit
jmpinit / libload.sh
Last active June 6, 2020 15:28
How to use a shared library written in C from a program written in Rust. ( rust version 0.7. \ host: i686-unknown-linux-gnu ).
# so the lib can be found when the test is run
export LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH
# alternatively put the .so generated after running make someplace where the system will find it
@tcr
tcr / gist:4416956
Last active November 29, 2017 03:38
Make a callable() object in all browsers and Node.js
if (!Object.__proto__) {
var sandbox = function () {
// create an <iframe>
var iframe = document.createElement("iframe");
iframe.style.display = "none";
document.documentElement.appendChild(iframe);
return frames[frames.length - 1];
}
var iframe = sandbox();