Skip to content

Instantly share code, notes, and snippets.


Victoria Drake victoriadrake

View GitHub Profile
# Create the Checker class
class Checker:
# Queue of links to be checked
TO_PROCESS = Queue()
# Maximum workers to run
# Maximum seconds to wait for HTTP response
victoriadrake /
Created Feb 28, 2020
Peter Norvig‘s Latency Numbers
Task Time
CPU execute typical instruction 1/1,000,000,000 sec = 1 nanosec
CPU fetch from L1 cache memory 0.5 nanosec
CPU branch misprediction 5 nanosec
CPU fetch from L2 cache memory 7 nanosec
RAM Mutex lock/unlock 25 nanosec
RAM fetch from main memory 100 nanosec
Network send 2K bytes over 1Gbps network 20,000 nanosec
RAM read 1MB sequentially from memory 250,000 nanosec
victoriadrake / commit-message-icons.txt
Last active Feb 21, 2020
Some opinionated emojis for iconizing commit messages.
View commit-message-icons.txt
🐣 Initial commit
🖍 Minor edit
🔧 Fix *
🌱 Add *
# Look in the public/ directory
find public/ \
# Ignore directories called "static" regardless of location
-not -path "*/static/*" \
# Print the file paths of all files ending with any of these extensions
\( -name '*.png' -o -name '*.jpg' -o -name '*.jpeg' \) -print0 \
# Pipe the file paths to xargs and use 8 parallel workers to process 2 arguments
| xargs -0 -P8 -n2 \
# Tell mogrify to strip metadata, and...
mogrify -strip \
View github_pages_makefile.make
OPTIMIZE = find $(DESTDIR) -not -path "*/static/*" \( -name '*.png' -o -name '*.jpg' -o -name '*.jpeg' \) -print0 | \
xargs -0 -P8 -n2 mogrify -strip -thumbnail '1000>'
.PHONY: all
all: get_repository clean get build test deploy
View test-page.html
<!DOCTYPE html>
<title>Test Data Page</title>
<meta charset="utf-8">
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css" type="text/css">
View Broken link test.html

Keybase proof

I hereby claim:

  • I am victoriadrake on github.
  • I am victoriadrake ( on keybase.
  • I have a public key ASBgVbW4EtZrQzs5umshoT0ItJMRyGh1HF-sT6WXe2jepAo

To claim this, I am signing this object:

View Show Git branch in shell

Add the current git branch to your bash prompt! In .bashrc:

parse_git_branch() {
 git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[0;1;38;5;247m\]> \[\033[3;38;5;68m\]\W $(parse_git_branch)\[\033[00m\] '
    PS1='${debian_chroot:+($debian_chroot)}\W $(parse_git_branch)\[\033[00m\] '
victoriadrake /
Created Mar 26, 2019
`$ gem install html-proofer` they said...

Steps to install html-proofer

sudo apt-get install ruby-dev
sudo gem install pkg-config
sudo gem install nokogiri -- --use-system-libraries
sudo apt-get install zlib1g-dev
sudo gem install html-proofer
You can’t perform that action at this time.