Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

// error[E0597]: `arc` does not live long enough
use std::cmp::min;
use std::io::{self, Write};
use std::sync::Arc;
use tokio::sync::Mutex;
use tokio_executor::blocking;
fn send<T: Write + 'static + Send + Sync>(
dest: &Arc<Mutex<T>>,
@mdonoughe
mdonoughe / get_lutron_cert.py
Last active January 17, 2022 03:11 — forked from mhofman/get_lutron_cert.sh
Generate a signed certificate valid to connect locally to a Lutron Caseta Smart Bridge
"""Guide the user through pairing and save the necessary files."""
# `python -m venv env`
# bash: `source ./env/bin/activate`
# powershell: `./env/scripts/activate.ps1`
# `pip install cryptography==2.1.3 requests==2.18.4`
# `python get_lutron_cert.py`
# your client key -> caseta.key
# your client certificate -> caseta.crt
@mdonoughe
mdonoughe / gist:1386987
Created November 22, 2011 21:13
fun javascript
(function(x){x=arguments;alert(_.toArray(x).join());})("a","b","c");
@mdonoughe
mdonoughe / fastcalls.txt
Created April 4, 2011 19:20
static routing and wavelength assignment that crashes
Tue Apr 5 21:56:50 2011 fastdata
930450 function calls (897978 primitive calls) in 2.469 CPU seconds
Ordered by: cumulative time
List reduced from 1350 to 20 due to restriction <20>
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.004 0.004 2.473 2.473 {execfile}
1 0.030 0.030 2.469 2.469 solve.py:5(<module>)