Skip to content

Instantly share code, notes, and snippets.

View json_parse.py
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 Jan 21, 2018
A playground explaining promise things in ES6
View promises.js
/*
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 Nov 10, 2015
Localhost in Rakefile
View 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 Jul 20, 2015
docker install linux mint
View gist:6e955cd53bae6e4a8d6e
sudo apt-get install apparmor docker.io