Skip to content

Instantly share code, notes, and snippets.

View neauoire's full-sized avatar
💭
Siouxsie & The Banshees - Cities In Dust

Devine Lu Linvega neauoire

💭
Siouxsie & The Banshees - Cities In Dust
View GitHub Profile
@neauoire
neauoire / keypress.rb
Created March 10, 2016 21:33 — forked from acook/keypress.rb
Read keypresses from user in terminal, including arrow keys using pure Ruby. This has since been folded into a much more robust gem called Remedy. https://rubygems.org/gems/remedy & https://github.com/acook/remedy
require 'io/console'
# Reads keypresses from the user including 2 and 3 escape character sequences.
def read_char
STDIN.echo = false
STDIN.raw!
input = STDIN.getc.chr
if input == "\e" then
input << STDIN.read_nonblock(3) rescue nil
@neauoire
neauoire / paradise-notifications.js
Last active October 9, 2015 14:25
Adds desktop notifications to Paradise
(function() {
if( !( 'Notification' in window ) ) {
return console.error(
'This browser does not support desktop notifications'
)
}
var icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGIAAABiCAYAAACrpQYOAAAMF2lDQ1BJQ0MgUHJvZmlsZQAASImVlwdUU8kax+eWFEJCC0RASuhNkF6l9yIgHWyEJEAoMQSCih1ZVHAtqIiiqOgKiKJrAWStWLCwCNjrgojKyrpYsKHyJgX0+d6ed96cM/f+7jff993/zJ25ZwYARXuWQJCFKgGQzc8TRgX6MBMSk5ikPwAKlAEBGAI9FjtX4B0ZGQb+sby7BRDx/bqlONc/+/3Xoszh5rIBQCIhp3By2dmQjwKAa7IFwjwACJ3QbjA3TyDmt5BVhVAgAESymNOkrCXmFClbS3xionwh+wFAprJYwjQAFMT5mfnsNJhHQQDZms/h8SHvhOzBTmdxIPdAnpSdPQeyIhWyacp3edL+LWfKeE4WK22cpX2RFLIfL1eQxZr/fw7H/y7ZWaKxd+jDSk0XBkWJ+wzHrTZzTqiYoXbkBD8lPAKyCuRLPI7EX8z30kVBsTL/QXauLxwzwADwc3NYfqGQ4ViiDFFmrLeMbVlCSSz0R8N5ecExMk4RzomS5Ufzubn+0WOczg0Ok+Vcyc8KH+OqVF5AMGQ409CjBekx8VKd6Pl8Xlw4ZAXInbmZ0aEy/0cF6b7hYz5CUZRYsyHkt6nCgCipD6aenTvWL8yKzZJoUIfslZceEySNxRK4uQlhY9o4XD9/qQaMw+XHyjRjcHb5RMliiwVZkTJ/rIqbFRglHWfsUG5+9Fhsdx6cYNJxwB5nsEIipfqxd4K8yBipNhwHYcAX+AEmEMGaAuaADMDrGGwahE/SlgDAAkKQBrjAUmYZi4iX