Skip to content

Instantly share code, notes, and snippets.

Tim Taubert ttaubert

Block or report user

Report or block ttaubert

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
thoughtpolice / Makefile
Created Aug 28, 2015
BLAKE-256 Cryptol Specification with SAW Script verification
View Makefile
$(CC) -emit-llvm -o blake256.bc -c blake256.c
saw blake256.saw
rm -f *.bc *~
sunnyone /
Last active May 20, 2017
Windows Unicode conversion in Rust
// Add to Cargo.toml
// [dependencies]
// winapi = "*"
// user32-sys = "*"
extern crate winapi;
extern crate user32;
fn from_wide_ptr(ptr: *const u16) -> String {
use std::ffi::OsString;
use std::os::windows::ffi::OsStringExt;
Centril /
Last active May 17, 2017
Rust: Sending callbacks in struct to a scoped thread with Box
use std::thread::{Thread, JoinGuard};
fn callback(v: usize) -> usize { v * 2 }
struct S {
cb: Box<Fn(usize) -> usize + Send>,
matthewmueller /
Last active Oct 13, 2019
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
# Source:
# Some things taken from here
# Ask for the administrator password upfront
DouglasSherk /
Last active Aug 29, 2015
MAC Address Randomizer
# You might want to note your old MAC address here. Use this to get it:
# ifconfig en0 | grep ether
MAC_ADDRESS=`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`
echo "Setting MAC address..."
sudo ifconfig en0 ether $MAC_ADDRESS
ifconfig en0 | grep ether
1-1 /
Created Dec 15, 2012
HashSet with chaining
import java.math.BigInteger;
import java.util.Arrays;
public class OpenHashMap {
class Entry {
String key;
String value;
public Entry(String key, String value) {
int3 / hashtable.c
Created Dec 10, 2012
Simple open-addressed hashtable
View hashtable.c
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <assert.h>
// no actual pointer should have this value, due to alignment
static void* DELETED = (void*)1;
static int TABLE_SIZE = 701;
brendandahl /
Created Oct 2, 2012
Build pdf.js and Copy to Gaia
pushd .;
cd ~/projects/mine/pdf.js
node make b2g
cp -R ~/projects/mine/pdf.js/build/b2g/content ~/projects/mine/gaia/apps/pdfjs/;
cd ~/projects/mine/gaia
rm -rf profile
/Applications/ -jsconsole -profile ~/projects/mine/gaia/profile/
yurydelendik / gist:3764535
Created Sep 21, 2012
alias for .git/config to squash commits
View gist:3764535
squash = !sh -c 'git checkout mozilla/master && git merge --no-commit --squash $0 && git checkout -B $0 && git commit -e'
You can’t perform that action at this time.