Skip to content

Instantly share code, notes, and snippets.

@danielgek
danielgek / Makefile
Created June 3, 2021 19:53 — forked from ddevault/Makefile
Tiny Wayland compositor
WAYLAND_PROTOCOLS=/usr/share/wayland-protocols
# wayland-scanner is a tool which generates C headers and rigging for Wayland
# protocols, which are specified in XML. wlroots requires you to rig these up
# to your build system yourself and provide them in the include path.
xdg-shell-protocol.h:
wayland-scanner server-header \
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
xdg-shell-protocol.c: xdg-shell-protocol.h
@danielgek
danielgek / useFetchStateMachine.ts
Created April 16, 2021 11:00 — forked from pffigueiredo/useFetchStateMachine.ts
Fetch reducer state machine with typescript support
import { Dispatch, Reducer, useReducer } from 'react';
type Nullable<T> = T | None;
type FetchMachineState<DataT, ErrorT> = {
status: 'idle' | 'loading' | 'success' | 'failure';
data: Nullable<DataT>;
error: Nullable<ErrorT>;
};
@danielgek
danielgek / ngrxintro.md
Created March 31, 2017 13:05 — forked from btroncone/ngrxintro.md
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

#Comprehensive Introduction to @ngrx/store By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents