Skip to content

Instantly share code, notes, and snippets.

View spro's full-sized avatar
🤙
!

Sean Robertson spro

🤙
!
View GitHub Profile
require 'countries'
require 'json'
ISO3166.configure do |config|
config.locales = [:en, :cs, :de, :es, :fr, :ja, :nl, :sk]
end
# {
# AF: {
# name: {
#!/bin/bash
HOSTNAME=$1
# Set up environment
git clone http://github.com/spro/dotfiles
cd dotfiles && ./bin/install-dotfiles
cd ~
sudo hostname $HOSTNAME
source ~/.bash_profile
@spro
spro / espancanese.lua
Created May 24, 2017 00:16
Small synthetic language for testing seq2seq model
-- > te grillo wa silencieusement matte iru
-- = your cricket is sleeping silently
genders = {
m={
the='el',
a='un',
my='me',
your='te',
},
> please if the temperature in minnesota is equal to 2 then turn the office light off thanks
( %if
( %condition
( %currentWeather
( $location minnesota ) )
( $operator equal to )
( $number 2 ) )
( %setDeviceState
( $device.name office light )
@spro
spro / gist:8839678
Last active April 7, 2016 07:45
Error in `node': corrupted double-linked list
*** Error in `node': corrupted double-linked list: 0x000000000a61c4b0 ***
======= Backtrace: =========
/usr/lib/libc.so.6(+0x72d7f)[0x7fb7d3285d7f]
/usr/lib/libc.so.6(+0x7854e)[0x7fb7d328b54e]
/usr/lib/libc.so.6(+0x795c9)[0x7fb7d328c5c9]
/usr/lib/libjpeg.so.8(+0x2ce1d)[0x7fb7d218fe1d]
/usr/lib/libjpeg.so.8(jpeg_abort+0x15)[0x7fb7d2175bf5]
/usr/lib/libjpeg.so.8(jpeg_finish_decompress+0x54)[0x7fb7d2179ad4]
/usr/lib/libvips.so.37(+0x11b318)[0x7fb7d297c318]
/usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x138)[0x7fb7d19b66a8]
@spro
spro / dnsmasq OS X.md
Last active March 16, 2016 09:45 — forked from ogrrd/dnsmasq OS X.md
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.dev domains, e.g. project.dev, awesome.dev and so on, without having to add to your hosts file each time.

Requirements

Install

@spro
spro / generated-20160128162937.coffee
Last active January 29, 2016 00:36
char-rnn generated CoffeeScript; -rnn_size 100 -max_epochs 50 -temperature 0.7
somata = new somata.Client
if errors.length
res.send 401
# User account
# ---------------------------------------------------------------------------------------
app.get '/streets/:channel_id/channels.json', (req, res) ->
email_form =
insert_comment = ($comments, comment_data) ->
# add this comment into the given $comments div somehow
$ ->
# create $comments
$comments = $('<div id="comments">')
$.get '/posts/123/comments.json', (comments_data) ->
for comment_data in comments_data
insert_comment $comments, comment_data
http = require 'http'
fs = require 'fs'
util = require 'util'
qs = require 'querystring'
get_score_data = ->
http.get 'http://sports.espn.go.com/nfl/bottomline/scores', (res) ->
data = ''
res.on 'data', (chunk) ->
data += chunk
events {
worker_connections 1024;
}
http {
include mime.types;
server {
listen 8080;
server_name localhost;