Skip to content

Instantly share code, notes, and snippets.

View harperreed's full-sized avatar

Harper Reed harperreed

View GitHub Profile
@harperreed
harperreed / shiftmca.py
Last active November 24, 2020 21:59 — forked from mushroomhostage/gist:3807487
shiftmca.py - shift Minecraft region files (.mca) to combine multiple worlds into one
# shiftmca.py - shift Minecraft region files (.mca) by a fixed number of regions
# Useful to combine multiple worlds into one world, with a region-level granularity
# You can't simply rename the r.#.#.mca files, because they contain embedded location
# information (which will cause "relocating" errors). This script fixes that.
# To use:
# 1. rename each r.<x>.<z>.mca adding 20 (or whatever needed to avoid overlap) to each <x>
# 2. edit the variables below appropriately to match your setup
# 3. run this script
@harperreed
harperreed / 11-21-2016-speedtest.txt
Last active November 15, 2017 22:33
Some speedtests
Retrieving speedtest.net configuration...
Retrieving speedtest.net server list...
Testing from XFINITY (69.136.181.44)...
Selecting best server based on latency...
Hosted by Comcast (Chicago, IL) [7.27 km]: 20.367 ms
Testing download speed........................................
Download: 489.38 Mbit/s
Testing upload speed..................................................
Upload: 33.93 Mbit/s
@harperreed
harperreed / If-you-can.md
Created January 8, 2016 21:01
If You Can - How Millennials Can Get Rich Slowly
@harperreed
harperreed / pings.txt
Created January 2, 2016 03:59
ma pings
64 bytes from 173.194.46.64: icmp_seq=6878 ttl=55 time=1684.976 ms
64 bytes from 173.194.46.64: icmp_seq=6879 ttl=55 time=716.402 ms
64 bytes from 173.194.46.64: icmp_seq=6880 ttl=55 time=6195.602 ms
64 bytes from 173.194.46.64: icmp_seq=6881 ttl=55 time=5191.274 ms
64 bytes from 173.194.46.64: icmp_seq=6882 ttl=55 time=4186.897 ms
64 bytes from 173.194.46.64: icmp_seq=6884 ttl=55 time=2195.624 ms
64 bytes from 173.194.46.64: icmp_seq=6883 ttl=55 time=3196.190 ms
64 bytes from 173.194.46.64: icmp_seq=6885 ttl=55 time=1203.062 ms
64 bytes from 173.194.46.64: icmp_seq=6886 ttl=55 time=199.262 ms
64 bytes from 173.194.46.64: icmp_seq=6888 ttl=55 time=12288.130 ms
@harperreed
harperreed / electric_objects.py
Last active August 11, 2022 10:02
Electric objects simple API wrapper
import requests
import urllib
import requests
import json
import random
"""
here is a wrapper for the *unreleased* electric objects API
Built by Harper Reed (harper@nata2.org) - @harper
@harperreed
harperreed / Brewfile
Created May 8, 2015 02:23
Harper's New Mac Brewfile
tap 'caskroom/cask'
tap 'homebrew/bundle'
brew 'brew-cask'
brew 'fortune'
brew 'go'
brew 'mobile-shell'
brew 'nmap'
brew 'node'
brew 'openssl'
brew 'pkg-config'
@harperreed
harperreed / config.json
Created December 29, 2014 17:33
Slack messages from CRON
{
"token":"xxxxxxxxxx",
"subdomain":"subdomain",
"username":"Eventbot",
"text":"<!everyone> here is an important link: <https://modest.com/|modest.com>",
"channel":"#general",
"icon": ":ghost:"
}
@harperreed
harperreed / sub.sh
Created December 29, 2014 17:23
my ghetto hacked vim^H^H^Hsub command
#!/bin/sh
#
# This shell script passes all its arguments to the binary inside the
# MacVim.app application bundle. If you make links to this script as view,
# gvim, etc., then it will peek at the name used to call it and set options
# appropriately.
#
# Based on a script by Wout Mertens and suggestions from Laurent Bihanic. This
# version is the fault of Benji Fisher, 16 May 2005 (with modifications by Nico
# Weber and Bjorn Winckler, Aug 13 2007).
@harperreed
harperreed / Brewfile
Created December 29, 2014 16:31
My brewfile
# Install Goodies
#
#
install caskroom/cask/brew-cask
install fortune
install go
install mobile-shell
install nmap
install node
@harperreed
harperreed / OAuthGspread.py
Created September 23, 2014 19:29
easily use access token and refresh token with gspread
import gspread
from oauth2client.client import OAuth2Credentials
import datetime
import requests
class OAuthGspread:
scope = ['https://spreadsheets.google.com/feeds', 'https://docs.google.com/feeds']
def __init__(self, client_id, client_secret, access_token, refresh_token, ):