Skip to content

Instantly share code, notes, and snippets.

View xstevens's full-sized avatar
💭
💻

Xavier Stevens xstevens

💭
💻
View GitHub Profile
@xstevens
xstevens / shell.log
Last active December 6, 2018 23:56
KIND 0.1.0-alpha on macOS host (Docker for Mac) EOF error
$ docker version
Client: Docker Engine - Community
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:47:43 2018
OS/Arch: darwin/amd64
Experimental: false
@xstevens
xstevens / boxstarter.ps1
Last active September 17, 2017 22:30
Boxstarter Commands for a new Windows box
# Description: Boxstarter Script
# Author: Jess Frazelle <[email protected]>
# Last Updated: 2017-09-11
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
# start http://boxstarter.org/package/nr/url?<URL-TO-RAW-GIST>
# OR
# Install-BoxstarterPackage -PackageName <URL-TO-RAW-GIST> -DisableReboots
#
# Learn more: http://boxstarter.org/Learn/WebLauncher
@xstevens
xstevens / keybase.md
Created August 13, 2014 04:05
keybase.md

Keybase proof

I hereby claim:

  • I am xstevens on github.
  • I am xstevens (https://keybase.io/xstevens) on keybase.
  • I have a public key whose fingerprint is 2376 F65C DC7D DBC4 186A 9862 EBD0 A074 0414 82C9

To claim this, I am signing this object:

@xstevens
xstevens / wipe.py
Created August 18, 2013 05:12
A python script to erase all posts from a Tumblr blog.
import pyblr
import oauth2 as oauth
import urllib
import urlparse
import time
'''
!WITH PROPER CREDENTIALS THIS WILL ERASE ALL POSTS FROM THE GIVEN TUMBLR BLOG!
Use with caution and make sure you know what you're doing. That said this is
@xstevens
xstevens / IdUtil.java
Last active December 12, 2015 08:09
Snippet for creating an hbase shell compatible ID from a UUID and given date. Modify to suit your needs.
public static String hbaseShellId(String id, Date d) throws IOException {
byte[] idBytes = IdUtil.nonRandByteBucketizeId(id, d);
StringBuilder sb = new StringBuilder("\"\\x");
sb.append(String.format("%02x", idBytes[0]));
sb.append((new String(idBytes)).substring(1));
sb.append("\"");
return sb.toString();
}
public static void main(String[] args) throws IOException {
@xstevens
xstevens / gist:3641802
Created September 5, 2012 18:18
Half-baked BitSet using byte[] rather than long[]
package com.mozilla.telemetry;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
/**
* Half-baked bitset using ints rather than longs
*/
public class PseudoBitSet {
@xstevens
xstevens / cleaner.py
Created October 5, 2011 23:29
Remove all post from your Tumblr account
import pyblr
import oauth2 as oauth
import urllib
import urlparse
import time
'''
!WITH PROPER CREDENTIALS THIS WILL ERASE ALL POSTS FROM THE GIVEN TUMBLR BLOG!
Use with caution and make sure you know what you're doing. That said this is