Skip to content

Instantly share code, notes, and snippets.

View jscheid's full-sized avatar

Julian Scheid jscheid

View GitHub Profile
@jscheid
jscheid / .psqlrc
Last active March 6, 2024 21:58
My ~/.psqlrc
-- Suppress output during configuration (re-enabled at bottom of this file)
\set QUIET 1
-- Set client encoding to UTF8 (to match what is on the server)
\encoding UTF8
-- Work in UTC
SET SESSION timezone TO 'UTC';
-- Verbose feedback
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
│ QUERY PLAN │
├─────────────────────────────────────────────────────────────────────────────────────────────┤
│ Index Scan using index_large_on_scope_id_and_busy_column on large (cost=0.44… │
│…..5877.24 rows=5516 width=4) (actual time=2.095..8.282 rows=5153 loops=1) │
│ Index Cond: ((scope_id = 501) AND (busy_column >= 3)) │
│ Planning Time: 0.454 ms │
│ Execution Time: 8.482 ms │
└─────────────────────────────────────────────────────────────────────────────────────────────┘
(4 rows)
@jscheid
jscheid / stacktrace.txt
Created March 3, 2023 12:06
yard-sorbet stack overflow
/usr/local/bundle/gems/yard-sorbet-0.8.0/lib/yard-sorbet/sig_to_yard.rb:31:in `convert_node'
/usr/local/bundle/gems/sorbet-runtime-0.5.10460/lib/types/private/methods/call_validation_2_7.rb:703:in `bind_call'
/usr/local/bundle/gems/sorbet-runtime-0.5.10460/lib/types/private/methods/call_validation_2_7.rb:703:in `block in create_validator_method_medium1'
/usr/local/bundle/gems/yard-sorbet-0.8.0/lib/yard-sorbet/sig_to_yard.rb:105:in `convert_list'
/usr/local/bundle/gems/sorbet-runtime-0.5.10460/lib/types/private/methods/call_validation_2_7.rb:703:in `bind_call'
/usr/local/bundle/gems/sorbet-runtime-0.5.10460/lib/types/private/methods/call_validation_2_7.rb:703:in `block in create_validator_method_medium1'
/usr/local/bundle/gems/yard-sorbet-0.8.0/lib/yard-sorbet/sig_to_yard.rb:49:in `convert_node_type'
/usr/local/bundle/gems/sorbet-runtime-0.5.10460/lib/types/private/methods/call_validation_2_7.rb:703:in `bind_call'
/usr/local/bundle/gems/sorbet-runtime-0.5.10460/lib/types/private/methods/call_validation_2_7.rb:
$ /private/tmp/ts2/mui-sc-lib-check/node_modules/.bin/tsc
node_modules/@mui/system/Container/createContainer.d.ts:12:87 - error TS2707: Generic type 'StyledComponent' requires between 2 and 4 type arguments.
12 createStyledComponent?: (...styles: Array<Interpolation<StyleFnProps<Theme>>>) => StyledComponent<ContainerProps>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@mui/system/Stack/createStack.d.ts:13:74 - error TS2694: Namespace '"/private/tmp/ts2/mui-sc-lib-check/node_modules/@mui/styled-engine/index"' has no exported member 'CreateStyledComponent'.
13 declare const defaultCreateStyledComponent: import("@mui/styled-engine").CreateStyledComponent<import("../createStyled").MUIStyledCommonProps<any>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.ClassAttributes<HTMLDivElement> | keyof React.HTMLAttributes<HTMLDivElement>>, {}, any>;
FROM drakkan/sftpgo
USER root
RUN apt-get update && apt-get install -y bsdmainutils
RUN echo foo > $HOME/a && ln -sf $HOME/a $HOME/x
RUN ls -ld $HOME/x && bash -c '((printf "\x00\x00\x00\x05\x01\x00\x00\x00\x06" && printf "\x00\x00\x00\x0f\x11\x00\x00\x00\x01\x00\x00\x00\x02/x\x00\x00\x00\x00" && sleep 1 && printf "\x00\x00\x00\x0b\x10\x00\x00\x00\x02\x00\x00\x00\x02/x" && sleep 1) | sftpgo startsubsys | hexdump -C) && exit 10'
diff --git a/webpack-subresource-integrity/index.ts b/webpack-subresource-integrity/index.ts
index 8fb3e36..5f89db5 100644
--- a/webpack-subresource-integrity/index.ts
+++ b/webpack-subresource-integrity/index.ts
@@ -7,7 +7,7 @@
import { createHash } from "crypto";
import type { Compiler, Compilation } from "webpack";
-import { javascript, sources } from "webpack";
+import { sources, RuntimeModule, Template } from "webpack";
diff --git a/examples/lazy-hashes-cycles/webpack.config.js b/examples/lazy-hashes-cycles/webpack.config.js
index d91a6a8..ab72135 100644
--- a/examples/lazy-hashes-cycles/webpack.config.js
+++ b/examples/lazy-hashes-cycles/webpack.config.js
@@ -34,12 +34,12 @@ module.exports = {
"utf-8"
);
const sriRegex = new RegExp(
- `${
- isEntry ? "self.sriHashes=" : "Object.assign\\(self.sriHashes,"
into -> try_into
query_all time: [37.094 us 37.383 us 37.723 us]
change: [+3.5800% +5.1397% +6.9096%] (p = 0.00 < 0.05)
Performance has regressed.
try_into -> into
query_all time: [36.867 us 37.347 us 37.870 us]
change: [-3.3305% -1.6812% -0.0427%] (p = 0.05 > 0.05)
declare module "@alexanderolsen/libsamplerate-js" {
interface Options {
converterType: number;
wasmPath: string;
}
interface Module {
simple(
numSamples: number,
numChannels: number,
@jscheid
jscheid / .dockerignore
Last active July 9, 2021 11:10
Running makem in Docker
Dockerfile
/.sandbox/
/.git/