Skip to content

Instantly share code, notes, and snippets.

View traeblain's full-sized avatar

Trae traeblain

View GitHub Profile

This confirms my identity at Keyoxide.org

openpgp4fpr:D31CBFF41515BA9341C28D3E66A2396E49348798

erifying my Blockstack ID is secured with the address 12WNtuZ6DjrwXmRbKmirVjF7eiKzigpqgg https://explorer.blockstack.org/address/12WNtuZ6DjrwXmRbKmirVjF7eiKzigpqgg
require "nokogiri"
require "open-uri"
url = "https://github.com/#{params['username']}"
document = Nokogiri::HTML(open(url))
contrib_boxes = document.css('.boxed-group')
{
:pop_repos => contrib_boxes[0].to_html,
:calendar => contrib_boxes[1].to_html
}

Keybase proof

I hereby claim:

  • I am traeblain on github.
  • I am traeblain (https://keybase.io/traeblain) on keybase.
  • I have a public key whose fingerprint is 0337 778D 2A99 E3AE 13A1 89BA 5426 CFE9 ED1F 039D

To claim this, I am signing this object:

@traeblain
traeblain / devserver.cmd
Created December 10, 2012 18:54
Batch file for Pelican since make doesn't work on Windows
@echo off
SETLOCAL EnableDelayedExpansion
set _PELICAN=$pelican
set _PELICANOPTS=$pelicanopts
set _BASEDIR=%cd%
set _INPUTDIR=%_BASEDIR%/content
set _OUTPUTDIR=%_BASEDIR%/output
set _CONFFILE=%_BASEDIR%/pelicanconf.py
@traeblain
traeblain / xkcd-plot.py
Created October 2, 2012 05:23
xkcd "Hand drawn" plot
# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
from math import pi as pi
import numpy as np
import scipy.ndimage as ndimage
def distortPlot(y):
yOffset = y + y.max() / 100 * np.random.randn(len(y))
@traeblain
traeblain / nginx.conf
Created June 19, 2012 03:52
nginx.conf for eli
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
@traeblain
traeblain / batman.py
Created December 16, 2011 20:21
Batman Equation (Python)
# -*- coding: utf-8 -*-
"""
Created on Fri Dec 16 09:30:30 2011
Python Batman Equation
@author: Trae Blain
"""
from __future__ import division
import matplotlib.pyplot as plt
@traeblain
traeblain / batman.m
Created August 1, 2011 22:21
Batman Equation
clf; clear; syms x y
eq1 = ((x/7)^2*sqrt(abs(abs(x)-3)/(abs(x)-3))+(y/3)^2*sqrt(abs(y+3/7*sqrt(33))/(y+3/7*sqrt(33)))-1);
eq2 = (abs(x/2)-((3*sqrt(33)-7)/112)*x^2-3+sqrt(1-(abs(abs(x)-2)-1)^2)-y);
eq3 = (9*sqrt(abs((abs(x)-1)*(abs(x)-.75))/((1-abs(x))*(abs(x)-.75)))-8*abs(x)-y);
eq4 = (3*abs(x)+.75*sqrt(abs((abs(x)-.75)*(abs(x)-.5))/((.75-abs(x))*(abs(x)-.5)))-y);
eq5 = (2.25*sqrt(abs((x-.5)*(x+.5))/((.5-x)*(.5+x)))-y);
eq6 = (6*sqrt(10)/7+(1.5-.5*abs(x))*sqrt(abs(abs(x)-1)/(abs(x)-1))-(6*sqrt(10)/14)*sqrt(4-(abs(x)-1)^2)-y);
eqf = '((x/7)^2*sqrt(abs(abs(x)-3)/(abs(x)-3))+(y/3)^2*sqrt(abs(y+(3*sqrt(33))/7)/(y+(3*sqrt(33))/7))-1)*(abs(x/2)-((3*sqrt(33)-7)/112)*x^2-3+sqrt(1-(abs(abs(x)-2)-1)^2)-y)*(9*sqrt(abs((abs(x)-1)*(abs(x)-3/4))/((1-abs(x))*(abs(x)-3/4)))-8*abs(x)-y)*(3*abs(x)+3/4*sqrt(abs((abs(x)-3/4)*(abs(x)-1/2))/((3/4-abs(x))*(abs(x)-1/2)))-y)*(9/4*sqrt(abs((x-1/2)*(x + 1/2))/((1/2-x)*(1/2+x)))-y)*((6*sqrt(10))/7+(3/2-abs(x)/2)*sqrt(abs(abs(x)-1)/(abs(x)-1))-(6*sqrt(10))/14*sqrt(4-(abs(x)-1)^2)-y)=0'
@traeblain
traeblain / tmb-wpmu-nag-remove.php
Created July 20, 2011 04:26
Remove WPMU's Horribly Useless Notification Plugin Nag
<?php
/*
Plugin Name: Remove WPMU Notification Plugin Nag
Plugin URI: http://wp.me/p1Aj2B-6g
Description: WPMU started trying to force people that use plugins by their developers to install a Notification plugin by making a persistent notification bug the admins. This removes that annoying piece.
Version: 1.2
Author: Trae Blain
Author URI: http://traeblain.com
License: GPL2
*/