Skip to content

Instantly share code, notes, and snippets.

View richardmcmillen-examtime's full-sized avatar

Richard McMillen richardmcmillen-examtime

View GitHub Profile
require 'ruby_identicon'
# background_color: (Integer, default 0) the background color of the identicon in rgba notation (e.g. xffffffff for white)
# border_size: (Integer, default 35) the size in pixels to leave as an empty border around the identicon image
# grid_size: (Integer, default 7) the number of rows and columns in the identicon, minimum 4, maximum 9
# square_size: (Integer, default 50) the size in pixels of each square that makes up the identicon
# key: (String) a 16 byte key used by siphash when calculating the hash value (see note below)
#
# Varying the key ensures uniqueness of an identicon for a given title, it is assumed desirable for different applications
# to use a different key.
@richardmcmillen-examtime
richardmcmillen-examtime / Repo
Last active January 29, 2022 00:10
Open a project file on GitHub.
#!/bin/bash
#
# Open the specified file on GitHub. It will use the master branch by default:
#
# repo -f app/controllers/application_controller.rb
#
# Specify a different branch:
#
# repo -b another-branch -f app/controllers/application_controller.rb