Skip to content

Instantly share code, notes, and snippets.

I am a meat popsicle

Sean Handley seanhandley

I am a meat popsicle
Block or report user

Report or block seanhandley

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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
View data.rb
module H3
class Resolution
extend FFI::DataConverter
native_type FFI::Type::INT
RES_RANGE = 0..15
class << self
def to_native(value, _context)
failure unless value.is_a?(Integer) && RES_RANGE.cover?(value)
View typedef.rb
typedef :ulong_long, :h3_index

Smoky Red Pepper Chicken

Feeds 4.

Goes beautifully with green beans and rice or new potatoes.


  • 3 x Chicken breast fillets
  • 200ml Double cream
seanhandley / docker-compose.yml
Last active Oct 12, 2019
How To Set Up Docker For Mac (Mojave) with Native NFS
View docker-compose.yml
version: '2'
- "nfsmount:${CONTAINER_DIR}"
driver: local
seanhandley / lb.rb
Created Aug 26, 2017
Build a load balancer with Fog
View lb.rb
require 'fog/openstack'
conn = {
openstack_auth_url: ENV["OS_AUTH_URL"],
openstack_username: ENV["OS_USERNAME"],
openstack_api_key: ENV["OS_PASSWORD"],
openstack_project_name: ENV["OS_PROJECT_NAME"],
openstack_domain_id: ENV["OS_USER_DOMAIN_NAME"]
seanhandley / fizzbuzz.ex
Last active Sep 20, 2017
FizzBuzz in Elixir / The Magic of Functional Pattern Matching
View fizzbuzz.ex
fb = fn
0, 0, _ -> "FizzBuzz"
0, _, _ -> "Fizz"
_, 0, _ -> "Buzz"
_, _, x -> x
fizzbuzz = fn (n) -> fb.(rem(n, 3), rem(n, 5), n) end
fizzbuzz.(10) # => "Buzz"
View custom_attributes.rb
module CustomAttributes
def attributes(*attrs)
attrs.each do |sym|
define_method sym do
define_method :"#{sym}=" do |v|
instance_variable_set("@#{sym}", v)
You can’t perform that action at this time.