Skip to content

Instantly share code, notes, and snippets.


Kevin Hughes kevinhughes27

View GitHub Profile
kevinhughes27 / wat.rb
Created Jul 28, 2018
A trailing comma in a list of attr_reader hijacks the next method definition. How is this not a syntax error?
View wat.rb
class Wat
def initialize(thing)
@thing = thing
@foo = 'foo'
# this ends up creating an attr_reader for foo
# but shouldn't it throw an error when it
# sees `def` after a comma?
attr_reader :thing,

Keybase proof

I hereby claim:

  • I am kevinhughes27 on github.
  • I am kevinhughes27 ( on keybase.
  • I have a public key whose fingerprint is B263 BCD7 178F 9223 124C 6776 4753 1019 ABDA FEE7

To claim this, I am signing this object:

kevinhughes27 / himawari.ps1
Created Feb 22, 2016 — forked from MichaelPote/himawari.ps1
Windows Powershell Script to download the latest image from the Himawari-8 satelite, combine the tiles into a single image, convert to jpg and then set as the desktop background.
View himawari.ps1
# Himawari-8 Downloader
# This script will scrape the latest image from the Himawari-8 satellite, recombining the tiled image,
# converting it to a JPG which is saved in My Pictures\Himawari\ and then set as the desktop background.
kevinhughes27 /
Created Jan 10, 2016
the script I used to average every episode of That 70's Show into a singe video
# first mount the samba share (use the gui)
# then link the mounted smb share somewhere more convientent
# sudo ln -s /run/user/1000/gvfs/smb-share:server=dlink-71f6dd,share=volume_1-1 /mnt/network
# then run as usual
# python /mnt/network/TV\ Shows/That\ \'70s\ Show/ output.avi
import os
import sys
kevinhughes27 /
Created Nov 28, 2015
A simple program to display a warning message if I have been coding for more than 90 mins
#!/usr/bin/env bash
# add to cron tab
# crontab -e
# then append:
# */30 * * * * /home/kevin/
# need to have:
# xhost local:mpromber > /dev/null
# in bashrc
kevinhughes27 /
Created Aug 23, 2015
scrape date between 2 date ranges from my fitness pal. Scrapes current nutrients being tracked but you can change your settings and re-run the scraper
import myfitnesspal # pip install myfitnesspal
import ipdb
print 'logging in ...'
client = myfitnesspal.Client('username', 'password')
days = []
for i in range(2, 18+1):
print 'fetching 2015, 6,', i
days.append( client.get_date(2015, 6, i) )
kevinhughes27 / zuluru-scrape-polys.js
Last active Aug 29, 2015
scrape the actual polygon points from zuluru field drawings
View zuluru-scrape-polys.js
// run by pasting the function into dev console then call it
// can also use something like Custom JavaScript for websites:
// name and field are set by Zuluru
function scrape() {
data = ""
#!/usr/bin/env bash
# sleepy-bash
# kevin hughes
# 2015
# on each run this script reads a var increments
# it then sleeps for that long.
kevinhughes27 / hydra.lua
Created Jan 22, 2015
my half done config for hydra (osx window manager, now using thirds
View hydra.lua
-- autostart hydra
-- watch for changes"HOME") .. "/.hydra/", hydra.reload):start()
-- notify on start
hydra.alert("Hydra config loaded", 0.5)
-- open a repl