Skip to content

Instantly share code, notes, and snippets.

Avatar
🧀
Eating cheese

Sean Handley seanhandley

🧀
Eating cheese
View GitHub Profile
@seanhandley
seanhandley / docker-compose.yml
Last active Oct 15, 2020
How To Set Up Docker For Mac (Mojave) with Native NFS
View docker-compose.yml
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
@seanhandley
seanhandley / 1) InstallSublime.sh
Last active Aug 22, 2020
How to install Sublime Text 3 on CentOS
View 1) InstallSublime.sh
wget http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3059_x32.tar.bz2
tar vxjf sublime_text_3_build_3059_x32.tar.bz2
sudo mv sublime_text_3/ /opt/
sudo ln -s /opt/sublime_text_3/sublime_text /usr/bin/sublime
@seanhandley
seanhandley / gist:3089541
Created Jul 11, 2012
Gists - The second class citizens of Github
View gist:3089541

Gists - The second class citizens of Github

So, let me start by saying that gists are awesome. There's no faster, simpler way for me to share code snippts with syntax highlighting for all to see, clone, comment on and assist with.

Marvellous.

But something has been bothering me about gists for some time. A "Gist" in Github parlance, is a git repository backed file (or set of files) which can be edited in the browser by the owner and commented on by other users. Each edit is a github commit (with a commit SHA) and you can link people to different versions of a diff via a URL.

What I wish you could do is link people to diffs themselves, as you can with a full github repository.

View gist:d76c51099a32287c0a9074d5f15ac7d0
0.0.0.0 r4.sn-cxaaj5o5q5-tt16.googlevideo.com
0.0.0.0 r3.sn-q5u5bgv02-3c26.googlevideo.com
0.0.0.0 r12.sn-bvvbax-hn26.googlevideo.com
0.0.0.0 r7.sn-w5nuxa-o536.googlevideo.com
0.0.0.0 r1.sn-4g5e6n76.googlevideo.com
0.0.0.0 r3.sn-4g5e6n76.googlevideo.com
0.0.0.0 r4.sn-4g5e6n76.googlevideo.com
0.0.0.0 r5.sn-4g5e6n76.googlevideo.com
0.0.0.0 r6.sn-4g5e6n76.googlevideo.com
0.0.0.0 r1.sn-nx5e6n76.googlevideo.com
@seanhandley
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 } ->
:needs_fuel
%Plane{ has_pilot?: false } ->
:needs_pilot
_ ->
@seanhandley
seanhandley / remote_team_meet.md
Last active Mar 15, 2020
Backend Team Final Interview Stage (Remote Edition)
View remote_team_meet.md

🤝 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
seanhandley / about.md
Last active Jan 5, 2020
Intcode Quine
View about.md
@seanhandley
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
@seanhandley
seanhandley / pi_info.sh
Last active Jul 16, 2019
Display Info About Raspberry Pi
View pi_info.sh
# Cheers to the original author https://www.raspberrypi.org/forums/viewtopic.php?t=23440
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"
}
You can’t perform that action at this time.