This file contains hidden or 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
# Update stretch repositories | |
RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' \ | |
-e 's|security.debian.org|archive.debian.org|g' \ | |
-e '/stretch-updates/d' /etc/apt/sources.list | |
# LetsEncrypt DST Root CA X3 expired on 2021-09-30 | |
# https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/ | |
RUN sed -i '/^mozilla\/DST_Root_CA_X3.crt$/ s/^/!/' /etc/ca-certificates.conf | |
RUN update-ca-certificates |
This file contains hidden or 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
import * as openpgp from 'openpgp'; | |
import {Octokit} from "@octokit/rest"; | |
const privateKeyArmored: string = `-----BEGIN PGP PRIVATE KEY BLOCK----- | |
HAHAHAHA did you really think | |
-----END PGP PRIVATE KEY BLOCK----- | |
`; | |
async function createEmptyCommit( | |
octokit: Octokit, |
This file contains hidden or 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
#include <assert.h> | |
#include <stdbool.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#define ONE_MB (1024 * 1024) | |
#define SLEEP_BUF_DEFAULT 16 // wait 1s every N MB | |
#define SLEEP_BUF_MIN 0 | |
#define SLEEP_BUF_MAX (1024 * 1024) // surely nobody has 1 TB lying around |
This file contains hidden or 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
import glob | |
import json | |
import os | |
import sys | |
import time | |
import typing | |
import urllib.request | |
period_in_seconds = 60 | |
watch_time_seconds = 300 |
This file contains hidden or 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
import java.util.Base64 | |
private data class ContinuationDebugPart( | |
val a: Int, | |
val b: Int, | |
val key: String | |
) { | |
override fun toString(): String { | |
return "[$a!$b!$key]" |
This file contains hidden or 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
# - run with `mitmdump -s intercept.py -q` | |
# - clear counters with | |
# curl -sx localhost:8080 http://example.com/clear | jq | |
# - show counters with | |
# curl -sx localhost:8080 http://example.com/show | jq | |
import json | |
import typing | |
import mitmproxy.http |
This file contains hidden or 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
import math | |
# https://gist.github.com/cincodenada/6557582 | |
def rotr(num, bits): | |
num &= (2 ** bits - 1) | |
bit = num & 1 | |
num >>= 1 | |
if (bit): | |
num |= (1 << (bits - 1)) |
This file contains hidden or 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
import threading | |
import typing | |
from dataclasses import dataclass, field | |
from queue import Queue | |
from typing import TypeVar, Generic | |
T = TypeVar('T') | |
R = TypeVar('R') | |
This file contains hidden or 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 bash | |
# HAHA, so you may not blame me. | |
exit 1 | |
set -euo pipefail | |
# eg sda1 | |
DISK="$1" |