Skip to content

Instantly share code, notes, and snippets.

View HHRy's full-sized avatar
👔
Looking for work, contact me!

Ryan Stenhouse HHRy

👔
Looking for work, contact me!
View GitHub Profile
@HHRy
HHRy / amazon_translate.rb
Created August 28, 2018 10:44
Simple wrapper with caching for Amazon Translate
# Simple wrapper around the amazon translate SDK that also tries to
# implement basic caching to avoid sending (and being charged for)
# duplicate translations.
#
# Supports JA, EN at the moment only.
#
require 'digest/sha2'
module AmazonTranslate
class <<self
@HHRy
HHRy / gist:23b5a851eef4b98ab97e
Last active August 29, 2015 14:21
Simple CSS Grid (SASS)
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
.row {
*zoom: 1;
padding-top: 2px;

Keybase proof

I hereby claim:

  • I am HHRy on github.
  • I am hhry (https://keybase.io/hhry) on keybase.
  • I have a public key whose fingerprint is 774A D9D8 0C40 30A7 54FE F81E 7D92 F865 1804 6437

To claim this, I am signing this object:

@HHRy
HHRy / Gemfile.rb
Created November 2, 2014 06:31
Quick and dirty script to convert Shinsei Power Direct "CSV" files into QIF files for importing into applications
source "https://rubygems.org"
gem "qif"
@HHRy
HHRy / gist:6389485
Created August 30, 2013 12:48
Letter to MP

Dear Mr Lazarowicz,

I’ve recently came across the news that the UK Border Agency are trailing some new signage in centers in Glasgow and London - these signs targeting the most vulnerable asylum seekers telling to go home are, to me, disgusting.

On every chair back, and every wall, and hanging from the ceiling are signs which read “Ask about going home”, “Is life here hard? Going home is simple.” and “This plane can take you home, we can book the tickets”.

These people are here because they’re facing persecution at home and are seeking shelter and freedom here. These signs are a repulsive throwback to some of the more dark chapters of recent European history and have no place in a compassionate, modern democracy.

I urge you to please do what you can to end this demeaning practice.

ryan-imac:Desktop ryan$ whois mindblea.ch
whois: This information is subject to an Acceptable Use Policy.
See http://www.nic.ch/terms/aup.html
Domain name:
mindblea.ch
Holder of domain name:
The Happy Geek Ltd
@HHRy
HHRy / gist:3817656
Created October 2, 2012 09:12
How we learn a language

How we learn a language

We all use language in fun and interesting ways, even when we don’t think about it. Our industry brings us together with people from all over the world, even some of the folks attending this conference will speak English as a second or even third language.

In a past life I was a teacher of english as a foreign language, and these days I’ve kept that passion for languages alive by becoming multilingual myself.

I’ll speak about how we pick up a programming language in much the same way as we learn to speak a natural language and then integrate ourselves in the culture surrounding that programming language in much the same way.

I’m not going to talk at boring lengths about language theory, but instead evaluate how we learn a language as humans – regardless of its origin. I hope to make it clear that you can apply some of – if not all – the same skills you use to easily pick up a new programming language to give you a real leg-up in learning a foreign language.

@HHRy
HHRy / gist:3817636
Created October 2, 2012 09:10
Cultured Localisation

Cultured Localisation: Or how not to offend 1 billion people

This talk isn’t really about localisation or internationalisation (add a ‘z’ if you prefer!) – it’s about culture and understanding. It’s about how we should all be approaching localisation challenges as people problems and to give good examples of how to get it right and where you can go so very wrong.

Your framework and tool of choice is the easy part – understanding the people you’re wanting to each out to is oh-so-very hard and too often seen as only just a translation problem – a simple matter of swapping one string for another.

I’ll talk about how people communicate across cultures, even when they are so different. Drawing on my experience as a teacher of english as a foreign language and my own travels and struggles to absorb another people’s language and culture, I hope I’ll change how you think about solving these problems in future.

Hell, I’ll even make you laugh. I hope.

@HHRy
HHRy / gist:3171230
Created July 24, 2012 17:06
It's more CSS-like than actual CSS.
/*
h1 through to h6 map to the Markdown heading attributes, p matches any paragraph, there
isn't any ID or class support (yet!).
All sizes should be in percentages or points. Everything is calculated relative to the page's
font-size.
*/
page {
page-size: 'A4';
#!/usr/bin/env ruby
require 'webrick'
include WEBrick
dir = Dir::pwd
port = 12000 + (dir.hash % 1000)
puts "URL: http://#{Socket.gethostname}:#{port}"
s = HTTPServer.new(