Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e
set -x
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
PROJECT_DIR="$SCRIPT_DIR/../"
pushd $PROJECT_DIR
rm -rf ./LibNoosphere.xcframework
@jsantell
jsantell / .mozconfig
Last active August 29, 2015 14:22 — forked from jryans/.mozconfig
export CC="clang"
export CXX="clang++"
export CFLAGS="-fcolor-diagnostics"
export CXXFLAGS="-fcolor-diagnostics"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-firefox-release-b2g-desktop
mk_add_options AUTOCONF=autoconf213
ac_add_options --enable-application=b2g
@jsantell
jsantell / index.html
Last active August 29, 2015 14:10 — forked from padenot/index.html
<script>
function lalaj() {
var out = document.querySelector("pre");
var a = new OfflineAudioContext(1, 44100, 44100);
var b = a.createBuffer(1, 44100, 44100);
var g = a.createGain();
var bb = b.getChannelData(0);
for (var i = 0; i < bb.length; i++) {
bb[i] = 1.0;
}
# Fish 2.0 config
# Utility functions
function sser --description "Starts a SimpleHTTPServer in the current directory"
if [ (count $argv) = 0 ]
sser 8080
return
end
#!/bin/bash
emcc sin.cpp -o sin.js \
-s EXPORTED_FUNCTIONS="['_Sin_constructor','_Sin_destructor','_Sin_setFrequency','_Sin_setAmplitude','_Sin_getFrequency','_Sin_computeBuffer']"
cat sin-proxy.js >> sin.js
# From https://github.com/kripken/emscripten/wiki/Tutorial
cd ~/
curl http://llvm.org/releases/3.2/clang+llvm-3.2-x86_64-apple-darwin11.tar.gz > llvm.tgz
tar xzvf llvm.tgz
ln -s clang+llvm-3.2-x86_64-apple-darwin11 llvm
git clone git://github.com/kripken/emscripten.git
cd emscripten
LLVM=~/llvm/bin ./emcc
LLVM=~/llvm/bin ./emcc tests/hello_world.cpp
<!doctype html>
<script>
function pause() {
console.log('pause')
node.disconnect()
}
function play() {
console.log('play');
exports[key] = value for key, value of {
run : run
document : document
parse : parse
resolveSource : resolveSource
version : version
defaults : defaults
languages : languages
}
@jsantell
jsantell / proxyServer
Created July 2, 2012 13:28 — forked from randylubin/proxyServer
Node.js Multi-App Proxy Server with Forwarding
var http = require('http'),
httpProxy = require('http-proxy');
//
// Setup proxy server with forwarding
//
var options = {
router: {
'proxytest.randylubin.com': '127.0.0.1:7200',
'randylubin.com': '127.0.0.1:7200',