Skip to content

Instantly share code, notes, and snippets.

@deian
deian / rlbox-pdfium-tiff.diff
Last active March 8, 2021 06:23
Retrofit libtiff use in pdfium to use RLBox
From 223d7f640173062ac0b11beb85f7edf11ed5873a Mon Sep 17 00:00:00 2001
From: RLBox Team <[email protected]>
Date: Fri, 5 Mar 2021 00:37:26 -0800
Subject: [PATCH] Retrofit libtiff to use RLBox
This is not a complete port, but is most of the way there. We still need
to:
- Implement a few more verifiers.
- Move small bits of code into the sandbox.

Keybase proof

I hereby claim:

  • I am deian on github.
  • I am deian (https://keybase.io/deian) on keybase.
  • I have a public key ASD_p9nsB3wuNObQWCB7GovqLTdirFqlijR5ezE8XiCcEQo

To claim this, I am signing this object:

@deian
deian / gist:f2de2f1c33580ed1b3fd
Created May 25, 2014 01:56
Using OpenPGP.JS to verify signature of a file
"use strict";
var fs = require('fs');
var path = require('path');
var assert = require('assert');
var async = require('async');
var crypto = require('crypto');
var pgp = require('openpgp');

Keybase proof

I hereby claim:

  • I am deian on github.
  • I am deian (https://keybase.io/deian) on keybase.
  • I have a public key whose fingerprint is A3CA DAA1 144E 5CDE B67F 37B9 5ED1 79BB 628C 02E2

To claim this, I am signing this object:

@deian
deian / blocks
Last active December 30, 2015 02:49
blocks & refcount
#include <stdio.h>
#include <Block.h>
typedef void (^voidToVoid) (void);
typedef void (^voidToVoidToVoid) (voidToVoid);
void f(void) {
voidToVoidToVoid a = ^ (voidToVoid b) {
voidToVoid b2 = Block_copy(b);
"use strict";
var dcl = require('./dclabels.js');
var l = new dcl.Label([new dcl.Group("yo"),
new dcl.Group(["a","b"]),
new dcl.Group(["yo","no"]),
new dcl.Group(["a"])
])
console.log(l+'')
console.log(l.subsumes(new dcl.Label())+'')
console.log((new dcl.Label()).subsumes(l)+'');
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div id="log"></div>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
@deian
deian / chat-app-spec
Last active December 19, 2015 08:09
Chat app description
deian.net/hails-tutorial.html
<iframe src="/messages#last"></iframe>
---------------------------------------------
GET /message |^| --> get all from DB
| | find + next
| | --> html refresh 2; + list messages
| | --> #last
| |
| |
@deian
deian / key-val-boiler
Created July 3, 2013 19:08
key-value store hails
{-# LANGUAGE OverloadedStrings #-}
module SimpleApp2 (server) where
import Prelude hiding (lookup)
import Data.String
import Control.Monad
import qualified Data.ByteString.Char8 as S8
import qualified Data.ByteString.Lazy.Char8 as L8
import LIO
<PUBLIC:COMPONENT TAGNAME="xss">
<PUBLIC:ATTACH EVENT="ondocumentready" ONEVENT="main()" LITERALCONTENT="false"/>
</PUBLIC:COMPONENT>
<SCRIPT>
function main()
{
alert("HTC script executed.");
}
</SCRIPT>