Skip to content

Instantly share code, notes, and snippets.

Eric S. Bullington esbullington

Block or report user

Report or block esbullington

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View yubikey_public_yubikey
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF1M1O4BEAC6++K/a+5/HVYI490BiHxGRyoJVB2/3ZDh1HE9zsyV8o6b7In3
rEP+EocgMrGeeOUOe0ePeANNvB3E58TWkOe8MjQgEDpxUpiV8VdpCLnpVnoyEYx+
yo56RVQ52CLFOo5dyZ5USOv2lrfJqF/K6kwCy3Ywnw8kBbxupWIwbrYPkJWQ/ZmE
EpYYtTLaq9BvUEmD7tIHnr/I2vD0m88F896+Xrb/kdu4WZcxuto7ba0eOYmWvlYi
aLQFuCveDCsfz47yEywenmw5hRsS0Ax53JbS160sjUQwZcnqNa2+r3m45e0AvMTc
za3GKkZOfKns8WRQyrl1mLDDZrMHNOER5OZ/3PI0AmjAqHCMYPL9RJrQX/G3516s
fbIId9v3uTzeiwB3SGMQvJA08twbutFk7ci47hQm4lXEaVodqtr68pRbE6rIbFsS
g456Gd1dUHiFCIZ0OrMU7ljMqSXuo9DzvDz/xi8AHrNBkKpj4OaBzgisBJeZo+0N
@esbullington
esbullington / intro.md
Last active Sep 30, 2018
Convert Stylus to SASS/SCSS
View intro.md

Convert Stylus to SASS

Here's how I converted a whole batch of Stylus files to SASS without using a converter (none exist, that I'm aware of), converting each Stylus file manually, or programming my own Stylus->SASS converter, which would have entailed building a parser, and then generate SCSS from the AST.

First, grab sandr.py here: https://github.com/jfgiraud/sandr

Then, in the directory of your Stylus files, run (if you have multiple directory levels, you can do similar task using find):

for file in *.styl; do echo "/*! FILENAME: $file */" >tempfile; cat $file >>tempfile; mv tempfile $file; done 
@esbullington
esbullington / postgresbootstrap.sh
Last active Sep 15, 2015
Bash script for easy bootstrapping a PostgreSQL database
View postgresbootstrap.sh
#!/bin/bash
make_database () {
sudo -u postgres psql -d template1 -U postgres -c "CREATE USER $db_user WITH PASSWORD '$db_password';";
sudo -u postgres psql -d template1 -U postgres -c "CREATE DATABASE $db_name;";
sudo -u postgres psql -d template1 -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE $db_name to $db_user;";
sudo service postgresql restart;
}
echo "Please enter a database user: "
@esbullington
esbullington / nginx-ssl.conf
Last active Sep 29, 2015
Configuration to get an A+ on the Qualys SSL Labs test with fast performing and low overhead SSL ciphers. Works in combination with nginx 1.6.0 full and OpenSSL v1.0.1i.
View nginx-ssl.conf
user www-data www-data;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
View README.md

Using D3 in a React TransitionGroup to transition elements. D3 is used purely for transitions, not for data joins. The distinction between entering and exiting elements is handled by the TransitionGroup component. See the React documentation for further information.

Alternative implementations only with D3 and using React without addons.

Note: This implementation is around 30% slower in processing 1000 circles than the other two.

View gist:5f145343a6b95e3b3ddb
Verifying that +esbullington is my Bitcoin username. You can send me #bitcoin here: https://onename.io/esbullington
View keybase.md

Keybase proof

I hereby claim:

  • I am esbullington on github.
  • I am esbullington (https://keybase.io/esbullington) on keybase.
  • I have a public key whose fingerprint is 357E 716C D22C 43DA 7AAB BF96 B1B2 C410 2758 5882

To claim this, I am signing this object:

@esbullington
esbullington / getalltransactions
Created Nov 12, 2013
Command to fetch all Bitcoin blockchain transaction id's and put them in a (very large) text file. Requires the amazing jq, bitcoind (comes with reference client), along with standard linux coreutils.
View getalltransactions
bitcoind getblockcount | xargs seq | xargs -I{} bitcoind getblockhash {} | xargs -I{} bitcoind getblock {} | jq --raw-output '.tx[]' >> alltx.txt
@esbullington
esbullington / fips_codes.csv
Last active Dec 27, 2015
FIPS Codes to match the d3 cloropleth data format at http://bl.ocks.org/mbostock/raw/4090846/us.json Please note that the concatenated FIPS code at the end of each line has been put into int form to match Mike Bostock's geodata above, so leading zeros are suppressed.
View fips_codes.csv
state county state_code county_code fips
Alabama Autauga 01 001 1001
Alabama Baldwin 01 003 1003
Alabama Barbour 01 005 1005
Alabama Bibb 01 007 1007
Alabama Blount 01 009 1009
Alabama Bullock 01 011 1011
Alabama Butler 01 013 1013
Alabama Calhoun 01 015 1015
Alabama Chambers 01 017 1017
@esbullington
esbullington / reverse_rejection.py
Created Nov 3, 2012
Python script to reverse MTurk rejection using boto library and M2Crypto
View reverse_rejection.py
#!/usr/bin/env python
import sys
# We use M2Crypto here because MTurk API does not presently allow use of IAM keys, making SSL essential
# Adapted from script by Heikki Toivonen:
# http://www.heikkitoivonen.net/blog/2009/10/12/using-m2crypto-with-boto-secure-access-to-amazon-web-services/
from M2Crypto import httpslib, SSL
from boto.mturk.connection import MTurkConnection
You can’t perform that action at this time.