Skip to content

Instantly share code, notes, and snippets.

View micahstubbs's full-sized avatar

Micah Stubbs micahstubbs

View GitHub Profile
@chrisle
chrisle / hashes.js
Last active September 16, 2020 13:12
Compute hashes for Google Docs
function computeMD5(str) {
var digest = Utilities.computeDigest(Utilities.DigestAlgorithm.MD5, str);
return Utilities.base64Encode(digest);
}
function computeSHA1(str) {
var digest = Utilities.computeDigest(Utilities.DigestAlgorithm.SHA_1, str);
return Utilities.base64Encode(digest);
}
@aman-tiwari
aman-tiwari / WORKSHOP.md
Last active January 10, 2021 07:55
Document containing install instructions and cool links for the Making Maps with ML workshop!

Messing with Maps and ML quickstart

This document: https://goo.gl/AqGoE8

Installation instructions

By far the most annoying part of getting started with messing with ML is installing researcher-made code and turning it into something fun to play with.

Before doing any of these, please install Miniconda. If you don't have it installed already, here's how:

For OSX, this is:

@deprecatedcoder
deprecatedcoder / VoVRdata.csv
Last active March 3, 2021 11:22
Scraping of the VoVR site
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
"number","date","guestAudio","cover","background","audio","title","guestCover","desc"
"001","May 5, 2014","eVRydayVR","cover","http://d1icj85yqthyoq.cloudfront.net/wp-content/uploads/2014/05/d-banner-1024x182.jpg","http://d1icj85yqthyoq.cloudfront.net/wp-content/uploads/2014/05/Voices-of-VR-001-eVRydayVR.mp3","#1: eVRydayVR on Virtual Reality evangelism, communities & education","guestCover","desc"
"002","May 13, 2014","Eric Hodgson","http://d1icj85yqthyoq.cloudfront.net/wp-content/uploads/2014/05/hive-schematic-300x247.jpg","http://d1icj85yqthyoq.cloudfront.net/wp-content/uploads/2014/05/voices-of-vr-header-image-faded-1024x323.jpg","http://d1icj85yqthyoq.cloudfront.net/wp-content/uploads/2014/05/Voices-of-VR-002-Eric-Hodgson.mp3","#2: Eric Hodgson on spatial perception, redirected walking & the split between Old VR vs. New VR","hive schematic","desc"
"003","May 15, 2014","Oliver Kreylos","cover","http://d1icj85yqthyoq.cloudfront.net/wp-content/uploads/2014/05/Header.jpg","http://d1icj85yqthyoq.clo
module.exports = {
server: '.',
files: [
'*.html',
'src/*'
],
ui: false,
notify: false
};
@stevedh
stevedh / pge.py
Created November 4, 2012 06:07
PG&E Green button data downloader
##
## PG&E Green button data downloader
##
## @author Stephen Dawson-Haggerty <stevedh@eecs.berkeley.edu>
##
## Based on https://gist.github.com/3131346 and Andrew Krioukov's
## sMAPv1 PG&E driver for the old format of data.
##
import os
@cuschk
cuschk / filename.sh
Created July 8, 2016 11:30
Bash: file base name and extension
#!/usr/bin/env bash
f='/path/to/example.txt'
base="${f##*/}"
echo $base
#=> example.txt
echo "${base%.*}"
@jgarzik
jgarzik / ron-shamir-review.md
Created October 16, 2012 20:51
Peer review of "Quantitative Analysis of the Full Bitcoin Transaction Graph"

This is a review of "Quantitative Analysis of the Full Bitcoin Transaction Graph" by Dorit Ron and Adi Shamir.

There are some incorrect details and analyses that warrant attention.

Oct. 31 UPDATE

The authors have introduced several revisions to their paper, available at the same URL as before.

The criticism below may be outdated in part or in full.

@adrianmcli
adrianmcli / tutorial-refactor.js
Created January 6, 2017 19:24
A refactor of André Staltz's example twitter program in his tutorial on RxJS: https://gist.github.com/staltz/868e7e9bc2a7b8c1f754
// UI Event Streams --------------------------------------------
const refreshButton = document.querySelector('.refresh');
const closeButton1 = document.querySelector('.close1');
const closeButton2 = document.querySelector('.close2');
const closeButton3 = document.querySelector('.close3');
const refreshClickStream = Rx.Observable.fromEvent(refreshButton, 'click');
const close1ClickStream = Rx.Observable.fromEvent(closeButton1, 'click');
const close2ClickStream = Rx.Observable.fromEvent(closeButton2, 'click');
const close3ClickStream = Rx.Observable.fromEvent(closeButton3, 'click');
@micahstubbs
micahstubbs / .block
Last active January 16, 2023 00:33
Soviet Bl.ock
license: CC0-1.0
@ecarter
ecarter / mapOrder.js
Created December 2, 2011 15:40
Order an array of objects based on another array order
/**
* Sort array of objects based on another array
*/
function mapOrder (array, order, key) {
array.sort( function (a, b) {
var A = a[key], B = b[key];