Skip to content

Instantly share code, notes, and snippets.

@greyspectrum
greyspectrum / bootstrap.sh
Created July 2, 2017 19:56
Creates a consistent environment in which to build this site with Jekyll: https://github.com/whispersystems/whispersystems.org
#!/usr/bin/env bash
# Install dependencies for Ruby:
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs -y
# Install Ruby:
cd
wget http://ftp.ruby-lang.org/pub/ruby/2.4/ruby-2.4.1.tar.gz
echo "a330e10d5cb5e53b3a0078326c5731888bb55e32c4abfeb27d9e7f8e5d000250 ruby-2.4.1.tar.gz" > sha2sum
@greyspectrum
greyspectrum / random-password.sh
Created July 3, 2017 16:22
Create a 15 character password with /dev/urandom
#!/usr/bin/env bash
strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 15 | tr -d '\n'; echo
#ifdef __KERNEL__
# include <linux/crush/hash.h>
#else
# include "hash.h"
#endif
/*
* Robert Jenkins' function for mixing 32-bit values
* http://burtleburtle.net/bob/hash/evahash.html
* a, b = random bits, c = input and output