Skip to content

Instantly share code, notes, and snippets.

View kn0ll's full-sized avatar
🏠
Working from home

Nic Luciano kn0ll

🏠
Working from home
View GitHub Profile
@marcmartino
marcmartino / Form.tsx
Last active June 3, 2022 09:08
Example io-ts react final form based off blitzjs boilerplate
import { TypeOf, Type, InputOf, OutputOf } from "io-ts"
import { matchW } from "fp-ts/Either"
import { reduce } from "fp-ts/Array"
import { flow } from "fp-ts/function"
import { ReactNode, PropsWithoutRef } from "react"
import { Form as FinalForm, FormProps as FinalFormProps } from "react-final-form"
export { FORM_ERROR } from "final-form"
export interface FormProps<C extends Type<TypeOf<C>, OutputOf<C>, InputOf<C>>>
extends Omit<PropsWithoutRef<JSX.IntrinsicElements["form"]>, "onSubmit"> {
@winuxue
winuxue / puppeteer-ubuntu-1804.md
Created May 22, 2019 01:15
Solution for common dependences issues using puppeteer in ubuntu 18.04 (Bionic)

puppeteer dependeces in ubuntu 18.04 (Bionic)

error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

sudo apt-get install libnss3

error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory

sudo apt-get install libxss1
@abatko
abatko / US Zip Code Geolocations from 2018 Government Data
Last active January 31, 2024 07:43
All US zip codes with their corresponding geolocations (latitude and longitude coordinates). Comma delimited for your database goodness. Source: https://www.census.gov/geographies/reference-files/time-series/geo/gazetteer-files.html > ZIP Code Tabulation Areas > Download the ZIP Code Tabulation Areas Gazetteer File
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158327, -66.932928
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.447538, -66.557681
@flpvsk
flpvsk / recorderWorkletProcessor.js
Last active March 22, 2024 06:28
An example of a recorder based on AudioWorklet API.
/*
A worklet for recording in sync with AudioContext.currentTime.
More info about the API:
https://developers.google.com/web/updates/2017/12/audio-worklet
How to use:
1. Serve this file from your server (e.g. put it in the "public" folder) as is.
@john2x
john2x / 00_destructuring.md
Last active March 15, 2024 14:24
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences