Skip to content

Instantly share code, notes, and snippets.

View thlorenz's full-sized avatar
👁️
{ this.props.status }

Thorsten Lorenz thlorenz

👁️
{ this.props.status }
View GitHub Profile
@thlorenz
thlorenz / dorny-filters-generator.ts
Last active August 16, 2023 03:25
script: Dorny path filter generator (derived from deps of the provided package)
import path from 'path'
// 1. Define root of project from which to resolve all packages
const ROOT = path.resolve(__dirname, '..')
// 2. Define the relative path of the package that we generate the dorny filters for
const PACK = process.argv[2]
if (PACK == null) {
throw new Error(
'Need to supply relative path argument for package you want to render dorny filter for'
@thlorenz
thlorenz / all-but-di.fm.js
Last active February 10, 2023 07:49
Get Di.fm and related stations playlist for all channels
// Run as a Chrome Snippetfrom either of the below urls:
// https://www.jazzradio.com/member/favorite/channels
// https://www.classicalradio.com/member/favorite/channels
// https://www.radiotunes.com/member/favorite/channels
// https://www.rockradio.com/member/favorite/channels
// https://www.zenradio.com/member/favorite/channels
const KEY = '<yourkeyhere>'
const subsidy = document.location.host.split('.')[1]
function getChannelInfos() {
@thlorenz
thlorenz / script.sh
Last active October 4, 2022 16:34
Walk through the "Solanas Token Program Explained" article using _amman_ to label, inspect, etc.
#!/usr/bin/env bash
## Prepare Wallets
solana-keygen new --silent --no-bip39-passphrase --outfile solpair1.json
solana-keygen new --silent --no-bip39-passphrase --outfile solpair2.json
### Airdrop and label them
amman airdrop ./solpair1.json -l soladdr1
@thlorenz
thlorenz / intro to common lisp.org
Last active May 22, 2020 10:19
Notes from commander_trashdin's Lisp intro on twitch

Common Lisp Twitch Intro Video Notes

Notes for intro provided by commander_thrashdin.

Functions

(fun arg1 arg1 ...)
@thlorenz
thlorenz / ngrok.txt
Last active May 2, 2020 17:46
batufo: ngrok url updater
http://05738ef0.ngrok.io
@thlorenz
thlorenz / keybase.md
Last active June 11, 2019 19:14
keybase.md

Keybase proof

I hereby claim:

  • I am thlorenz on github.
  • I am thlorenz (https://keybase.io/thlorenz) on keybase.
  • I have a public key ASDi53IJKgU2P7pjH8Aepd3pnhwCfFWfL7s7VHVBAuHPMwo

To claim this, I am signing this object:

@thlorenz
thlorenz / _obs-settings-slow-internet.md
Last active November 24, 2018 02:24
[settings] OBS settings for streaming with not so great internet

OBS Low Internet Settings

These were provided to me by @feross at some point and then I tweaked them to work with slow internet, i.e. 1MBPS up.

I'm posting the the screenshots of those settings in the comments and I added two files that I found via File/Show Profile Folder

@thlorenz
thlorenz / deoptmark.js
Last active August 13, 2018 20:37
Provide benchmark.js interface to just run functions meant to be benchmarked, i.e. to collect deoptimization info
'use strict'
const deferred = {
resolve: function dontCare() {}
}
class DeoptMark {
constructor({ ITER = 1E3 } = {}) {
this._ITER = ITER
this._fns = []
@thlorenz
thlorenz / Understanding why the new V8 is so Damn Fast, One Demo at a Time.md
Last active May 23, 2018 17:15
[tallk] Understanding why the new V8 is so Damn Fast, One Demo at a Time

Understanding why the new V8 is so Damn Fast, One Demo at a Time

Abstract

The entire V8 compiler architecture as well as large parts of the Garbage Collector where updated recently. TurboFan replaced Crankshaft, Orinoco now collects garbage in parallel whenever possible. Node.js v8 shipped with this new and improved version of V8. As a result we can finally write idiomatic and declarative JavaScript without worrying about incurring performance overhead due to JavaScript compiler shortcomings.

At least this is what the V8 team tells us. In this talk we will explore if and why this is true, one demo at a time.

@thlorenz
thlorenz / async-wrap-express-wrapper.md
Last active August 26, 2018 15:09
async/wrap express wrapper

Summary

Tried to improve debugging when an express middleware is wrapped to auto-handle errors of an asnync function.

Turns out the below reads a bit better than a return Promise.catch() implementation, but still, once we reach the central express error handler, the line of the wrapped function that caused the error isn't included.

Implementation

'use strict'