Skip to content

Instantly share code, notes, and snippets.

View micahstubbs's full-sized avatar

Micah Stubbs micahstubbs

View GitHub Profile
@simme
simme / Install_tmux
Created October 19, 2011 07:55
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@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];
@bradmontgomery
bradmontgomery / ShortIntroToScraping.rst
Created February 21, 2012 02:00
Really short intro to scraping with Beautiful Soup and Requests
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@unbracketed
unbracketed / export_repo_issues_to_csv.py
Last active August 3, 2023 18:13
Export Issues from Github repo to CSV (API v3)
"""
Exports Issues from a specified repository to a CSV file
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
"""
import csv
import requests
@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.

@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
@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);
}
@shawnbot
shawnbot / index.md
Last active August 23, 2023 10:18
Testing web pages with Xcode's iOS Simulator

Finding the Simulator

You can test with the iOS Simulator that comes with Xcode. Navigate to the Xcode app in the Finder, right click and select "Show Package Contents":

screen shot 2013-05-06 at 12 04 27 pm

Then navigate to Contents > Applications, and open the shortcut to "iPhone Simulator" (it may be called "iOS Simulator" depending on which version of Xcode you're running):

screen shot 2013-05-06 at 12 05 45 pm

@matt-west
matt-west / pearson-correlation.js
Created September 9, 2013 20:24
Pearson Correlation (JavaScript)
/**
* @fileoverview Pearson correlation score algorithm.
* @author matt.west@kojilabs.com (Matt West)
* @license Copyright 2013 Matt West.
* Licensed under MIT (http://opensource.org/licenses/MIT).
*/
/**
* Calculate the person correlation score between two items in a dataset.