Normally, if a program doesn't set a SIGTERM
handler, it needs --init
:
Dockerfile
:
FROM alpine:3.20
COPY a.c .
RUN apk add build-base \
Using TransformStream
in place of traditional queue implementations is an interesting approach that leverages the stream API's natural queuing and backpressure features. Below is a breakdown of how you might implement each queue type using TransformStream
, adhering to the constraint of using no more than 2 TransformStream
s per queue, and addressing any limitations that arise.
TransformStream
is sufficient to maintain the FIFO order.const fifoQueue = new TransformStream(undefined, undefined, { highWaterMark: Infinity });
impl<V: Value> core::str::FromStr for NonNormalizingDec<V> { | |
type Err = &'static str; | |
#[inline(never)] | |
#[rustfmt::skip] | |
fn from_str(s: &str) -> Result<Self, Self::Err> { | |
/// Converts an ASCII decimal digit to an int. | |
/// | |
/// In release builds, no range checks are performed and passing a | |
/// non-digit character will result is undefined (yet safe) behavior. |
This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.
Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.
This tutorial will teach you how to set up a Telegram MTProxy on an Ubuntu 22.04 sever using AWS Lightsail, although you can use any other Linux distribution and cloud provider.
Using a Telegram proxy is a safe, easy and effective way of overcoming Telegram bans. It's useful, for example, to keep using Telegram under tyrannical regimes, or to circumvent judges' decisions to block Telegram.
Telegram proxies are a built-in feature in all Telegram apps (both mobile and desktop). It allows Telegram users to connect to a proxy in just one or two clicks / taps.
Telegram proxies are safe: Telegram sends messages using their own MTProto secure protocol, and the proxy can only see encrypted traffic – there's no way for a proxy to decrypt the traffic and read the messages. The proxy does not even know which Telegram users are using the proxy, all the proxy sees is just a list of IPs.
#!/bin/bash | |
# Colors | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
NO_COLOR='\033[0m' | |
BLUE='\033[0;34m' | |
YELLOW='\033[0;33m' | |
NO_COLOR='\033[0m' |
function random(): number { | |
const buffer = new ArrayBuffer(8); | |
const bytes = crypto.getRandomValues(new Uint8Array(buffer)); | |
// sets the exponent value (11 bits) to 01111111111 (1023) | |
// since the bias is 1023 (2 * (11 - 1) - 1), 1023 - 1023 = 0 | |
// 2^0 * (1 + [52 bit number between 0-1]) = number between 1-2 | |
bytes[0] = 63; | |
bytes[1] = bytes[1] | 240; | |
class PathMe { | |
moves: string[] = []; | |
constructor() { | |
this.moves = []; | |
return this; | |
} | |
moveTo(x: number, y: number) { |
// Usage: | |
// node --import=./typescript-hook.js --watch ./dist/index.js | |
// | |
// Make changes to your TypeScript code, have it automatically | |
// recompiled, and see it reloaded in Node.js. | |
// | |
// This file is intended to be used as a Node.js preload module. | |
// The TypeScript compiler (tsc) will be run in watch mode. | |
// This is useful while running Node.js itself runs in watch mode. | |
// |
What if TypeScript libraries published just .ts
sources to npm instead of .js
and .d.ts
files? This might already be tempting for Bun-only libraries, but how will that impact users? This is easy to answer by experimenting on existing libraries that ship .js
, .d.ts
, and .ts
files.
RxJS ships .js
and .d.ts
files, but also .ts
files for debugability purposes. By tweaking its package.json "exports"
, we can compare tsc
performance on this file with imports resolving to .d.ts
files vs .ts
source files:
import {} from "rxjs";