Skip to content

Instantly share code, notes, and snippets.

Avatar

srdjan srdjan

View GitHub Profile
@srdjan
srdjan / 100+ different counter apps...
Last active Oct 31, 2020
More than 100 different counter applications...
View 100+ different counter apps...
100+ different js counter applications...
@srdjan
srdjan / ct_notes.txt
Created Dec 30, 2016 — forked from buzzdecafe/ct_notes.txt
Category Theory for Programmers: Notes
View ct_notes.txt
CATEGORY THEORY FOR PROGRAMMERS
Category Theory 1.1: Motivation and Philosophy
https://www.youtube.com/watch?v=I8LbkfSSR58&index=1&list=PLbgaMIhjbmEnaH_LTkxLI7FMa2HsnawM_
Composability, Abstraction, Reusability
Category Theory is a higher-level language.
Not a practical, executable language.
@srdjan
srdjan / recursion.ts
Created Apr 5, 2020 — forked from mikearnaldi/recursion.ts
Recursion schemes in TS
View recursion.ts
import { Functor1 } from "fp-ts/lib/Functor";
import { URIS, Kind } from "fp-ts/lib/HKT";
import { pipeable } from "fp-ts/lib/pipeable";
import { flow } from "fp-ts/lib/function";
interface Algebra<F extends URIS, A> {
(_: Kind<F, A>): A;
}
interface Fix<F extends URIS> {
@srdjan
srdjan / plink-plonk.js
Created Feb 15, 2020 — forked from tomhicks/plink-plonk.js
Listen to your web pages
View plink-plonk.js
@srdjan
srdjan / k3s-multipass.sh
Created Jan 12, 2020 — forked from lucj/k3s-multipass.sh
Setup a k3s kubernetes cluster using Multipass VMs
View k3s-multipass.sh
for node in node1 node2 node3;do
multipass launch -n $node
done
# Init cluster on node1
multipass exec node1 -- bash -c "curl -sfL https://get.k3s.io | sh -"
# Get node1's IP
IP=$(multipass info node1 | grep IPv4 | awk '{print $2}')
@srdjan
srdjan / IMyProtocol.d.ts
Created Mar 5, 2019 — forked from elierotenberg/IMyProtocol.d.ts
Statically typechecked serializable protocol
View IMyProtocol.d.ts
import { IProtocol, IRequestResponseMap, IEventMap } from "./IProtocol";
import { ISerializable } from "./ISerializable";
type RequestResponseMap = {
ping: {
RequestParams: {};
ResponseParams: {};
};
echo: {
RequestParams: ISerializable;
@srdjan
srdjan / TypeScriptFundamentals.ts
Created Mar 3, 2019 — forked from busypeoples/TypeScriptFundamentals.ts
TypeScript Fundamentals For JavaScript Developers
View TypeScriptFundamentals.ts
// TypeScript Fundamentals For JavaScript Developers
/*
Tutorial for JavaScript Developers wanting to get started with TypeScript.
Thorough walkthrough of all the basic features.
We will go through the basic features to gain a better understanding of the fundamentals.
You can uncomment the features one by one and work through this tutorial.
If you have any questions or feedback please connect via Twitter:
A. Sharif : https://twitter.com/sharifsbeat
*/
View recr.ts
type JSValue = { kind: 'JSNull' }
| { kind: 'JSBool', value: boolean }
| { kind: 'JSString', value: string }
| { kind: 'JSRational', asFloat: boolean, value: number }
| { kind: 'JSArray', value: JSValue[] }
| { kind: 'JSObject', value: { [key: string]: JSValue } }
@srdjan
srdjan / FlowTutorial.js
Last active Oct 3, 2017 — forked from busypeoples/FlowTutorial.js
Flow Fundamentals For JavaScript Developers
View FlowTutorial.js
// @flow
// Flow Fundamentals For JavaScript Developers
/*
Tutorial for JavaScript Developers wanting to get started with FlowType.
Thorough walkthrough of all the basic features.
We will go through the basic features to gain a better understanding of the fundamentals.
You can uncomment the features one by one and work through this tutorial.
@srdjan
srdjan / _about.md
Created Sep 15, 2017 — forked from sgoguen/_about.md
A Small Elm-like DSL in F#
View _about.md

Making Toys with F# - A Small Elm-like DSL in F#

A Small Elm-Like DSL in F#

I've been working on a talk about the virtues of building toy examples for the purpose of communicating ideas with simple interactive examples.

The toys I talk about in my presentation are based my interest in tools that allow programmers to quickly build web applications that allow them to explore their architecture. So to kickstart this series off, I want to introduce a simple

You can’t perform that action at this time.