Skip to content

Instantly share code, notes, and snippets.

View GerkinDev's full-sized avatar
⚒️
npx workin-hard

Gerkin GerkinDev

⚒️
npx workin-hard
View GitHub Profile
@GerkinDev
GerkinDev / spec.md
Last active September 24, 2018 21:10
Tsar spec

Slim arrow await operator (TS & JS)

The await operator can be used to chain async functions calls in a more elegant way. It is formed by a slim arrow (->), in place of the property accessor operator ..

Example :

const promiseResult = foo->bar();
yum remove docker \
docker-common \
docker-selinux \
docker-engine
yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
@GerkinDev
GerkinDev / eslint-browser.json
Created August 22, 2017 19:46
General ESlint config file
{
"env": {
"es6": true,
"browser": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "script"
},
"globals": {
@GerkinDev
GerkinDev / index.js
Created June 10, 2017 12:20
Backbone relational
var scope = {};
Backbone.Relational.store.addModelScope(scope);
scope.Foo = Backbone.RelationalModel.extend();
scope.Bar = Backbone.RelationalModel.extend({
relations: [
{
key:'foo',
relatedModel:'Foo',
type:'HasOne',
reverseRelation:{
function markdown_to_pixi(input, sketch, options, baseStyle){
var parser = new markdown_it(),
html_str = parser.render(input),
pixi_text = new pixi_multistyle_text(html_str, {
"default": baseStyle,
"p": {},
"em": {
fontStyle: "italic",
},
"strong": {