Skip to content

Instantly share code, notes, and snippets.

Eating cheese

Sean Handley seanhandley

Eating cheese
View GitHub Profile
seanhandley / 371vs372.diff
Created Jul 17, 2021
Diff of H3 lib function names from 3.7.1 to 3.7.2
View 371vs372.diff
< __faceIjkPentToGeoBoundary
> __faceIjkPentToCellBoundary
> __faceIjkToCellBoundary
< __faceIjkToGeoBoundary
> __gridDiskDistancesInternal
seanhandley / a.rb
Last active Nov 17, 2020
Finding Raffle Numbers @ RubyConf2020
View a.rb
# Greedy Approach with Array#product
# $ time ruby a.rb
# Found it! Your raffle number is f8ryt
# real 2m12.019s
# user 2m7.764s
# sys 0m3.383s
require 'digest'
seanhandley / plane_with_case.ex
Last active Apr 29, 2020
Elixir Pattern Matching
View plane_with_case.ex
defmodule Plane do
defstruct is_fueled?: false, has_pilot?: false
def take_off(plane) do
case plane do
%Plane{ is_fueled?: false } ->
%Plane{ has_pilot?: false } ->
_ ->
seanhandley /
Last active Mar 15, 2020
Backend Team Final Interview Stage (Remote Edition)

🤝 Backend Team Final Interview Stage (Remote Edition)

During the next few weeks as we encourage all staff to work from home, we'll be trying out a new "final stage" of the hiring process.

Typically, we'd invite the candidate to the office to meet members of the engineering team in person, have lunch, and chat with the hiring manager.

The hard part (technical testing) is over and the focus is on getting to know each other. As such, our remote version of this process should focus on:

  • Social activities.
  • Letting the candidate see us working in-situ.
seanhandley /
Last active Jan 5, 2020
Intcode Quine
seanhandley / robot.log
Created Dec 11, 2019
Debug log from the space hull painting robot @ Advent of Code 2019, Day 11
View robot.log
This file has been truncated, but you can view the full file.
[09340e50][0] RECEIVED 1
[09340e50][0] READ ARG 0 from position 8
[09340e50][0] INPUT 1
[09340e50][0] WRITE 1 to 8
[09340e50][2] READ ARG 0 from position 8
[09340e50][2] READ ARG 1 from absolute position 4
[09340e50][2] JNZ loc 8 is 1 (jumping to loc 350)
[09340e50][350] READ ARG 0 from absolute position 351
[09340e50][350] RB 672
View feedback_looped_amplifiers.txt
This file has been truncated, but you can view the full file.
# Debug Mode On
[a] READ[1] => 8
[a] IN(8)
[a] WRITE[8] <= 5
[a] READ[8] => 5
[a] READ[4] => 10
[a] READ[5] => 8
[a] ADD(5, 10, 8)
[a] WRITE[8] <= 15
View gist:e64c9dbaa0d52c7d04635fc94250e873
SESSION=`curl -s -L -I http://raspberrypi:9091/transmission/web | grep X-Transmission-Session-Id | cut -d' ' -f 2 | sed 's/[[:space:]]*$//'`
curl 'http://raspberrypi:9091/transmission/rpc' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.9,fr;q=0.8,ru;q=0.7' -H "X-Transmission-Session-Id: `echo $SESSION`" -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' -H 'Pragma: no-cache' -H 'Content-Type: json' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'Referer: http://raspberrypi:9091/transmission/web/' -H 'DNT: 1' --data-binary '{"method":"torrent-add","arguments":{"paused":false,"download-dir":"/mnt/sda1/New","filename":"'"${URL}"'"}}' --compressed --insecure
seanhandley /
Last active Jul 16, 2019
Display Info About Raspberry Pi
# Cheers to the original author
function pi_info_uptime() {
let upSeconds="$(/usr/bin/cut -d. -f1 /proc/uptime)"
let secs=$((${upSeconds}%60))
let mins=$((${upSeconds}/60%60))
let hours=$((${upSeconds}/3600%24))
let days=$((${upSeconds}/86400))
printf "%d days, %d hours, %d minutes, %d seconds" "$days" "$hours" "$mins" "$secs"
View gist:d76c51099a32287c0a9074d5f15ac7d0