Skip to content

Instantly share code, notes, and snippets.

@joesavage
joesavage / gist:00945a6ecc4abb8721cf
Last active August 29, 2015 14:15
LLVM [2.6] JIT Tutorial 1 (OS X, 2015)
// A modified version of the "LLVM JIT Tutorial 1" code from http://goo.gl/1cNfH7
// which actually works with the latest versions of LLVM as of Feb 2015.
//
// To compile if you're on OS X using 'llvm' [libs, etc.] from Homebrew:
// clang++ -g test.cpp `/usr/local/opt/llvm/bin/llvm-config --cxxflags --ldflags --libs core --system-libs` -I/usr/local/opt/llvm/include -o test
#include "llvm/IR/Module.h"
#include "llvm/IR/Function.h"
#include "llvm/PassManager.h"
#include "llvm/IR/CallingConv.h"
# 1. Generate private key
openssl genrsa -out /etc/ssl/private/example.com.key 4096
# 2. Generate Certificate Signing Request (CSR)
# [Fill in details as appropriate leaving email, challenge password, and optional company name empty. Be careful with FQDN!]
openssl req -new -key /etc/ssl/private/example.com.key -out /etc/ssl/private/example.com.csr
# 3. Submit CSR and recieve site certificate
# 4. Set permissions as appropriate
https://www.torproject.org/about/overview.html.en
https://svn.torproject.org/svn/projects/design-paper/tor-design.pdf
https://svn.torproject.org/svn/projects/roadmaps/2009-03-11-performance.pdf
https://www.torproject.org/getinvolved/relays.html.en
http://www.overclockers.com.au/wiki/Folding_Challenges,_Incentives_and_Awards
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.114.809&rep=rep1&type=pdf
http://timreview.ca/article/657
http://boinc.berkeley.edu/
http://boinc.berkeley.edu/addon_item.php?platform=web&item=http%3A%2F%2Fapps.facebook.com%2Fprocessors%2Fnew.php
http://boinc.berkeley.edu/addon_item.php?platform=web&item=http%3A%2F%2Fapps.facebook.com%2Fboinc_milestones%2F
http://www.mersenne.org/
http://folding.stanford.edu/
http://folding.stanford.edu/home/teams-stats/
http://fold.it/portal/
# Basic Rewrites
location ~ ^(.*/)index(\.html)?$ { return 301 $scheme://$host$1; }
location ~ ^(/.+)\.html$ { return 301 $scheme://$host$1; }
location ~ /$ {
# 'try_files' > 'index', to avoid re-write/location rules.
try_files $request_uri/index.html $request_uri/index.php =404;
}
try_files $uri.html $uri/ =404;
@joesavage
joesavage / dabblet.css
Created January 24, 2014 19:27
Untitled
body {
background: #222;
text-align: center;
}
input {
font-size: 1.5em;
width: 20em;
margin-top: 2em;
}
@joesavage
joesavage / zz.countries.nerd.dk.rbldnsd
Created July 26, 2014 14:38
zz.countries.nerd.dk.rbldnsd
This file has been truncated, but you can view the full file.
$SOA 7200 countries-ns.mdc.dk. read.the.homepage.at.http.countries.nerd.dk. 2013013100 28800 7200 604800 7200
5.224.7.0/24 :127.0.0.20:ad
5.224.254.0/23 :127.0.0.20:ad
5.225.7.0/24 :127.0.0.20:ad
5.225.254.0/23 :127.0.0.20:ad
31.201.76.0/24 :127.0.0.20:ad
37.19.14.248/29 :127.0.0.20:ad
37.222.7.0/24 :127.0.0.20:ad
37.222.254.0/23 :127.0.0.20:ad
37.223.254.0/23 :127.0.0.20:ad
row(0, R, R) :- !.
row(N, R, Acc) :- L is N - 1,
row(L, R, [N | Acc]).
% LESS EFFICIENT VERSION:
% row(0, []) :- !.
% row(N, R) :- L is N - 1,
% row(L, S),
% append(S, [N], R).
(function() {
var desiredInput = "success";
var insertChar = (function(i, self) {
userInput.push(desiredInput.charCodeAt(i));
Module.resume("char_ready");
if (i < desiredInput.length) {
return setTimeout((function() { self(i + 1, self) }), Math.floor(Math.random() * 1500));
}
});
insertChar(0, insertChar);
@joesavage
joesavage / after.js
Created March 15, 2016 08:27
emscripten_suspend web worker test case
self.addEventListener('message', (function(e) {
var data = e.data;
switch (data.cmd) {
case 'init':
(function() {
run();
var desiredInput = "success";
var insertChar = (function(i, self) {
Module.userInput.push(desiredInput.charCodeAt(i));
Module.resume("char_ready");