Skip to content

Instantly share code, notes, and snippets.

View ewust's full-sized avatar

Eric Wustrow ewust

View GitHub Profile
use std::collections::HashMap;
use std::collections::hash_map::Entry;
use std::cell::RefCell;
use std::rc::Rc;
#[derive(Debug)]
struct Bar {
x: u32,
}
extern crate mio;
use mio::*;
use mio::tcp::{TcpListener, TcpStream};
struct MyHandler;
impl Handler for MyHandler {
type Timeout = ();
type Message = ();
#!/usr/bin/python
import struct
import socket
import time
import nacl.secret
import nacl.utils
from nacl.encoding import HexEncoder
import sys
{
"txid" : "4988608d667d6198388816ec39dfa568662948bf1213440a82877883362a5637",
"version" : 1,
"locktime" : 0,
"vin" : [
{
"txid" : "6434c34a741cd10e30259ac738384a94bfd91c344bc657a0bfc54362b6674286",
"vout" : 0,
"scriptSig" : {
"asm" : "OP_DUP OP_HASH160 2fc4b4923521d25390c25762e5a999124c71e9a0 OP_EQUALVERIFY OP_CHECKSIG",

Keybase proof

I hereby claim:

  • I am ewust on github.
  • I am ewust (https://keybase.io/ewust) on keybase.
  • I have a public key whose fingerprint is 09C9 1D5A 2507 9EDE 05D9 2585 E1F4 0675 9DBF 4C43

To claim this, I am signing this object:

if (key)
{ do {
#ifdef BSAES_CAPABLE
if (BSAES_CAPABLE)
{
AES_set_encrypt_key(key,ctx->key_len*8,&gctx->ks);
CRYPTO_gcm128_init(&gctx->gcm,&gctx->ks,
(block128_f)AES_encrypt);
gctx->ctr = (ctr128_f)bsaes_ctr32_encrypt_blocks;
break;
<meta name="description" content="Blinkenlights" />
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="http://blinken.eecs.umich.edu/client.js"></script>
</head>
<body></body>
</html>
(new Blinken({title: "Red Green", author: "ewust"})).run(function(lights) {
// variable that keeps track of if we are red (true) or green (false)
var strand_red = true;
// Set the strand to full brightness
for (i=0; i<100; i++) {
lights[i].a = 1;
}
var b = new Blinken({title: "Some title", author: "Me"});
b.run(initializer);
function initializer(lights) {
// Set the strand to full brightness
for (i=0; i<100; i++) {
lights[i].a = 1;
}
// Return our update function
return update;
}