Skip to content

Instantly share code, notes, and snippets.

View jscheid's full-sized avatar

Julian Scheid jscheid

View GitHub Profile
INTERRUPT = Interrupt.new.freeze
WAITER =
lambda do |task, io, events, result, waiters|
result[io] = io.wait(events, nil) or return
waiters.each do |waiter|
if waiter != task && waiter.alive?
Fiber.scheduler.raise(waiter.fiber, INTERRUPT)
end
end
rescue Interrupt
thread 'Adapter Runtime' panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/rust_decimal-1.26.1/src/decimal.rs:470:23:
Number less than minimum value that can be represented.
stack backtrace:
0: 0xaaaada10b634 - std::backtrace_rs::backtrace::libunwind::trace::h2ad594f8af3ecd79
at /rustc/c7c49f44a7bb561dd9317e14908a1e50fa478ce5/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
1: 0xaaaada10b634 - std::backtrace_rs::backtrace::trace_unsynchronized::h41fd9b69da5916b6
at /rustc/c7c49f44a7bb561dd9317e14908a1e50fa478ce5/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0xaaaada10b634 - std::sys::backtrace::_print_fmt::h99ff2ed8bd5c537e
at /rustc/c7c49f44a7bb561dd9317e14908a1e50fa478ce5/library/std/src/sys/backtrace.rs:66:9
3: 0xaaaada10b634 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h03904fbf62f9bdf
thread 'Adapter Runtime' panicked at readyset-sql-passes/src/adapter_rewrites/autoparameterize.rs:221:61:
called `Result::unwrap()` on an `Err` value: NotEqual
stack backtrace:
0: 0xaaaae02fb634 - std::backtrace_rs::backtrace::libunwind::trace::h2ad594f8af3ecd79
at /rustc/c7c49f44a7bb561dd9317e14908a1e50fa478ce5/library/std/src/../../backtrace/src/backtrace/libunwind.rs:116:5
1: 0xaaaae02fb634 - std::backtrace_rs::backtrace::trace_unsynchronized::h41fd9b69da5916b6
at /rustc/c7c49f44a7bb561dd9317e14908a1e50fa478ce5/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0xaaaae02fb634 - std::sys::backtrace::_print_fmt::h99ff2ed8bd5c537e
at /rustc/c7c49f44a7bb561dd9317e14908a1e50fa478ce5/library/std/src/sys/backtrace.rs:66:9
3: 0xaaaae02fb634 - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h03904fbf62f9bdf2
@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,"