Skip to content

Instantly share code, notes, and snippets.

🛠️
creatin' some stuff

Tomasz Ducin ducin

🛠️
creatin' some stuff
Block or report user

Report or block ducin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ducin
ducin / ecommerce-order.json
Created Jan 26, 2020
various json schemas
View ecommerce-order.json
{
"type": "object",
"properties": {
"orderId": {
"type": "string",
"faker": "random.uuid"
},
"customer": {
"type": "string",
"faker": "name.findName"
@ducin
ducin / actions.ts
Last active Jun 5, 2019
redux setup
View actions.ts
import { INC } from './constants';
export const Inc = () => ({
type: INC as typeof INC
})
export type Actions =
| ReturnType<typeof Inc>
@ducin
ducin / ^.md
Last active Mar 28, 2019
Functional Composition with Static Types in TypeScript, Tomasz Ducin, Wrocław TypeScript #3, 2019.03.27
View ^.md
@ducin
ducin / ^.md
Last active Sep 3, 2019
Functional Composition with Static Types in TypeScript, Tomasz Ducin, Warsaw TypeScript #2, 2019.02.06
View ^.md
@ducin
ducin / LICENSE
Created Dec 28, 2018
Lorem Ipsum License
View LICENSE
Lorem Ipsum License
Copyright (c) [year] [fullname]
Permission is Lorem ipsum hereby granted, dolor sit amet, free of charge,
to any person obtaining a copy consectetur adipiscing elit. Proin nibh augue
of this software and associated documentation files (the "Software"),
suscipit a, scelerisque sed, to deal lacinia in, mi. Cras vel lorem.
Etiam pellentesque aliquet tellus, in the Software without restriction,
Phasellus pharetra nulla ac diam. Quisque semper justo at risus including
View .gitignore
node_modules
View model.js
const API_URL = 'http://localhost:3011/'
const OfficeModel = {
getCollection(){
return fetch(`${API_URL}offices`)
.then(res => res.json())
},
async __extendOfficeWithEmployees(office){
const employees = await EmployeeModel.getCollection(office.city)
return { ...office, employees }
@ducin
ducin / api.md
Last active Sep 12, 2019
Mock REST API typings and cheat sheet
@ducin
ducin / readme.md
Last active Apr 21, 2017
resolvedSame - new promise aggregate
View readme.md

resolveSame - new promise aggregate

  • if all promises get rejected - aggregate gets rejected (with positional reasons)
  • if some promises get resolved, then:
    • if they all get resolved with the same value - aggregate gets resolved with theValue
    • otherwise (different resolved values) - aggregate gets rejected with first two different values
View js-csp.built.js
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define("csp", [], factory);
else if(typeof exports === 'object')
exports["csp"] = factory();
else
root["csp"] = factory();
})(this, function() {
You can’t perform that action at this time.