Skip to content

Instantly share code, notes, and snippets.

@esbullington
esbullington / README.md
Last active August 29, 2015 14:09 — forked from jstcki/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.

@esbullington
esbullington / nginx-ssl.conf
Last active September 29, 2015 16:56
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.
user www-data www-data;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
@esbullington
esbullington / postgresbootstrap.sh
Last active September 15, 2015 14:13
Bash script for easy bootstrapping a PostgreSQL database
#!/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 / intro.md
Last active September 30, 2018 11:59
Convert Stylus to SASS/SCSS

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 / yubikey_public_yubikey
Last active February 8, 2021 05:32
Yubikey PGP public key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGAgyDsBEADCBLce/YkjlHKP/pFfXAlzR12seyp4SZlXGpWxESiekeCbp/KH
9G0NJqoUI80+Bb0jLD92jLY2Re72mTJUo2jdEUVYhcDk80YkLRQ49fCAEgIGBPej
gHRT+pKLEp21JbV7NYZZn3lG6yHuIaFmmD7NNKKtm11Pp9Bf5DrUwuCiC180FrT0
UsWv4n/V4/ROE8heVodcEY9UzrSQ/tKp0T4h1VT9v3Zblb1b0IwOG1UXAEjvTyoM
2EpdswBOfmmILQF6GiCneSVO96cI/Ena3I9DUDCJv4dH07h7oInWVqvlGZ+DkZ63
lW1O6tZs3zRGjuxAX4dfTPqAxTHmBbcrkqN7iRdPodh/O5dAhltjI2ZDTvXVG6iY
rGre/J+RJv8LifeKnDHvgwt6Pi4PzyNAvJifBUJKwfCn/NNyeUOgEKrETvu9SRRS
/I0RNBE4CDf2f9zy9AP6LMQ1RHVZE7HrIOSMy6nx7hoqJug5HGGotlpBSBhjb5Iw
@esbullington
esbullington / .bashrc
Created August 7, 2020 17:13
Minimal .bashrc
set -o vi
alias eb='vi ~/.bashrc'
alias sb='source ~/.bashrc'
alias et='vi ~/.tmux.conf'
alias st='source ~/.tmux.conf'
shopt -s direxpand
export HISTCONTROL=ignorespace:ignoredups
set bell-style none
if ! shopt -oq posix; then