Skip to content

Instantly share code, notes, and snippets.

from dataclasses import dataclass
from dacite import from_dict
import dataclasses
import types
import json
@dataclass
class Bar:
age: int
@ollyjshaw
ollyjshaw / promises.js
Last active January 21, 2018 08:51
A playground explaining promise things in ES6
/*
Promises are fun by Olly Shaw
https://twitter.com/olly_shaw
https://github.com/ollyjshaw
To run this download the file and do something like
node promises.js
logging will be out of order (Promises are asychronous). But hopefully you can find your way.
*/
@ollyjshaw
ollyjshaw / Rakefile
Created November 10, 2015 13:04
Localhost in Rakefile
desc 'Build and preview the site locally in development mode'
task :preview, [:profile] => :check do |task, args|
profile = args[:profile] || 'development'
awestruct_running_port = awestruct_port(profile)
run_awestruct "-P #{profile} -a -s --force -q --auto --livereload -b 0.0.0.0 -p #{awestruct_running_port}"
end
@ollyjshaw
ollyjshaw / gist:6e955cd53bae6e4a8d6e
Created July 20, 2015 12:48
docker install linux mint
sudo apt-get install apparmor docker.io