Skip to content

Instantly share code, notes, and snippets.

@kiliman
kiliman / calt.fea
Last active May 20, 2020 16:27
`calt` table generated by my Python script (output identical to FiraCodes Clojure script)
lookup bar_bar_bar_greater {
ignore sub bar bar' bar bar greater;
ignore sub bar' bar bar greater greater;
sub bar.spacer bar.spacer bar.spacer greater' by bar_bar_bar_greater.liga;
sub bar.spacer bar.spacer bar' greater by bar.spacer;
sub bar.spacer bar' bar greater by bar.spacer;
sub bar' bar bar greater by bar.spacer;
} bar_bar_bar_greater;
lookup less_bar_bar_bar {
@kiliman
kiliman / style.css
Last active January 16, 2021 14:38
Cobalt2 theme on GitHub
.highlight pre, .blob-wrapper, .blob-expanded .blob-code, .blob-expanded .blob-num { background-color: #193549 !important; color: #e1efff !important; }
.blob-code-inner, .blob-num, .highlight pre, .blob-wrapper { font-family: "Operator Mono SSm Lig" !important; color: #ffee80 !important; font-size:16px; line-height: 135% !important;}
.blob-num, .blob-expanded .blob-num {color: #aaa !important; }
.blob-code-hunk, .blob-num-hunk, .blob-num-expandable, .blob-code-expandable { background-color: #1E88E5; }
.blob-code-addition, .blob-num-addition { background-color: #005500; }
.blob-code-deletion, .blob-num-deletion { background-color: #550000; }
.pl-c, .pl-e { font-style: italic; }
.pl-k { color: #ff9d00; }
.pl-pds { color: #e1efff; }
.pl-pse { color: #e1efff; }
@kiliman
kiliman / hello.md
Created February 18, 2021 18:39
Created from Remix Form!

Hello World!

@kiliman
kiliman / sample.md
Created February 19, 2021 00:17
Created from Remix Form!

Sample Gist

From Remix

@kiliman
kiliman / heroicons-copy.js
Last active March 31, 2021 13:55
Tampermonkey script to copy SVG/JSX with specific classes
// ==UserScript==
// @name Heroicons copy
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://heroicons.com
// @icon https://www.google.com/s2/favicons?domain=tampermonkey.net
// @grant none
// ==/UserScript==

Configure HTTP/2 on express with Remix

Remix uses <link rel="modulepreload"/> on client-side JavaScript.

I thought it would be cool to setup HTTP/2 on express to enable pipelining the script files.

Add spdy package, then update server.js to setup server.

Generate self-signed SSL certificate and copy to ./certs folder.

diff --git a/node_modules/@remix-run/node/server.js b/node_modules/@remix-run/node/server.js
index 2a96bd3..e0e2a34 100644
--- a/node_modules/@remix-run/node/server.js
+++ b/node_modules/@remix-run/node/server.js
@@ -100,6 +100,7 @@ async function handleDocumentRequest(request, loadContext, build, routes, server
};
let actionErrored = false;
+ let clone = request.clone();
if (isActionRequest(request)) {
@kiliman
kiliman / git-dl.sh
Last active July 21, 2021 20:18
Bash script to download folder from GitHub repository
#! /bin/bash
if [ -z "$1" ]; then
echo USAGE: "$0" URL [BRANCH]
exit
fi
url="$1"
# default to branch master
branch=master
# optional 2nd parameter is branch
@kiliman
kiliman / error.js
Last active July 29, 2021 13:21
Patch to Remix for source-maps
// Copyright © 2021 React Training LLC. All rights reserved.
'use strict'
const sourceMap = require('source-map')
const fs = require('fs')
const path = require('path')
Object.defineProperty(exports, '__esModule', { value: true })
/**
* This thing probably warrants some explanation.
void Main()
{
var pushId = FirebasePushIDGenerator.GeneratePushID();
Console.WriteLine(pushId);
Console.WriteLine(FirebasePushIDGenerator.GeneratePushID());
Console.WriteLine(FirebasePushIDGenerator.GeneratePushID());
Thread.Sleep(5);
Console.WriteLine(FirebasePushIDGenerator.GeneratePushID());
Thread.Sleep(5);
Console.WriteLine(FirebasePushIDGenerator.GeneratePushID());