This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ISC © 2023, Strider. | |
/* eslint-disable complexity */ | |
const values = Object.values | |
import { useEffect, useRef } from 'react' | |
import { useParams } from 'react-router-dom' | |
import { useLocation } from 'react-router-dom' | |
import { useNavigate } from 'react-router-dom' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[buildPlans.IosevkaCustom] | |
family = "Iosevka Custom" | |
spacing = "term" | |
serifs = "sans" | |
noCvSs = true | |
exportGlyphNames = false | |
[buildPlans.IosevkaCustom.variants.design] | |
capital-i = "short-serifed" | |
capital-j = "serifed-symmetric" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Brand <T> = T & { readonly type: unique symbol } | |
// type Foo = Brand<number> | |
type Foo = number & { readonly type: unique symbol } | |
type Bar = number & { readonly type: unique symbol } | |
function Foo (n: number): Foo | |
{ | |
return (n as Foo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var log = console.log | |
var input = 'LLLAABBBBBEE' | |
log(input) | |
var c = compress(input) | |
log(c) | |
var d = decompress(c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Ensure (check, action) | |
{ | |
return function ensurer (data) | |
{ | |
return capture(() => check(data)) | |
.then(so => | |
{ | |
if (! so) | |
{ | |
if (! action) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var | |
exec = require('child_process').exec, | |
path = require('path'); | |
var | |
is_reverse = ~ process.argv.indexOf('reverse'); | |
sync = require('./sync.list'), | |
LEFT_PREFIX = '~', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var isArray = Array.isArray; | |
module.exports = function strip (ast) | |
{ | |
ast = ast.filter(filterOnlyLeaves(like)); | |
ast = ast.map(mapOnlyBranches(strip)); | |
return ast; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Locale () | |
{ | |
var locale = Object.create(Locale.prototype); | |
locale.ns = {}; | |
return locale; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XX( -1, UNKNOWN, "unknown error") \ | |
XX( 0, OK, "success") \ | |
XX( 1, EOF, "end of file") \ | |
XX( 2, EADDRINFO, "getaddrinfo error") \ | |
XX( 3, EACCES, "permission denied") \ | |
XX( 4, EAGAIN, "resource temporarily unavailable") \ | |
XX( 5, EADDRINUSE, "address already in use") \ | |
XX( 6, EADDRNOTAVAIL, "address not available") \ | |
XX( 7, EAFNOSUPPORT, "address family not supported") \ | |
XX( 8, EALREADY, "connection already in progress") \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(define (@filter fn L) | |
(foldl | |
(lambda (i A) | |
(if (fn i) | |
(append A (list i)) | |
A | |
) | |
) |
NewerOlder