Skip to content

Instantly share code, notes, and snippets.

@esbullington
esbullington / sha1sumcheck.sh
Last active October 7, 2015 04:28
Quick and easy command line script to compare sha1sum of a file and the sha1sum string (eliminates need to create a file)
[ $(sha1sum /path/to/file/to/check.txt | awk '{printf "%s", $1}') = "1a5091_SHA1_TO_CHECK_443234" ] && echo "Pass: sha1sum match" || echo "Warning: no match"
@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 / 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.

Verifying that +esbullington is my Bitcoin username. You can send me #bitcoin here: https://onename.io/esbullington

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: