Skip to content

Instantly share code, notes, and snippets.


Chris paxperscientiam

View GitHub Profile
ClickerMonkey / types.ts
Last active Jan 15, 2021
Typescript Helper Types
View types.ts
// when T is any|unknown, Y is returned, otherwise N
type IsAnyUnknown<T, Y, N> = unknown extends T ? Y : N;
// when T is never, Y is returned, otherwise N
type IsNever<T, Y = true, N = false> = [T] extends [never] ? Y : N;
// when T is a tuple, Y is returned, otherwise N
// valid tuples = [string], [string, boolean],
// invalid tuples = [], string[], (string | number)[]
aaronNGi /
Created Apr 28, 2020
Boilerplate for new POSIX shell scripts
version_text="Boilerplate for new scripts v$version"
options="h o: q v V"
help_text="Usage: $prog_name [-o <text>] [-hqvV] [<file>]...
Boilerplate for new scripts
mlocati /
Created Jan 23, 2019
Check if a go-pear.phar file is an official one
# This script checks if a go-pear.phar is the same as one of the
# ones released on
# MIT License
# Made by Michele Locati <> on 2019-01-23
set -o errexit
set -o nounset
package hello;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
set -e
# Ubuntu Developer Script For pdf2htmlEx
# Created by Rajeev Kannav Sharma
# Downloads and configures the following:
nadavrot /
Last active Jan 12, 2021
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).


Matrix multiplication is a mathematical operation that defines the product of

dobesv /
Last active Dec 18, 2020
Script to create (1) a local certificate authority, (2) a host certificate signed by that authority for the hostname of your choice
#!/usr/bin/env bash
# Creates a CA cert and then generates an SSL certificate signed by that CA for the
# given hostname.
# After running this, add the generated dev_cert_ca.cert.pem to the trusted root
# authorities in your browser / client system.
fanyang89 / fuse.ts
Created Apr 29, 2018
Example fuse-box config with code splitting
View fuse.ts
import * as autoprefixer from "autoprefixer";
import * as express from "express";
import {
gricard /
Last active Jun 27, 2020
Just some notes about my attempt to upgrade to webpack 4

If you enjoyed reading this, I'm intending to do more blogging like this over here:

This is not a complaint about Webpack or v4 in any way. This is just a record of my process trying it out so I could provide feedback to the webpack team

Hmm... I don't see any docs for 4.0 on I guess I'll just wing it. All I need to do is npm i -D webpack@next, right?

+ webpack@4.0.0-beta.2
View test-ts-enum-api
Run with `npm run exec`, will install all dependencies as needed.
You can’t perform that action at this time.