This file contains 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
FROM ubuntu:22.04 | |
ARG VERSION=5:25.0.4-1~ubuntu.22.04~jammy | |
RUN apt update \ | |
&& apt install -y ca-certificates curl gpg \ | |
&& install -m 0755 -d /etc/apt/keyrings \ | |
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc \ | |
&& chmod a+r /etc/apt/keyrings/docker.asc \ | |
&& echo \ |
This file contains 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
const host = "secure.gravatar.com"; | |
const defaultSize = "512"; | |
addEventListener("fetch", function(event) { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
async function handleRequest(request) { | |
// Check referer. | |
let referer = request.headers.get("referer") |
This file contains 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
package walk | |
import ( | |
"errors" | |
"fmt" | |
"os" | |
"path/filepath" | |
"sort" | |
"sync" | |
"time" |
This file contains 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
#!/bin/bash -e | |
PROXY="" | |
export http_proxy="${PROXY}" https_proxy="${PROXY}" | |
apt-get update | |
apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ |
This file contains 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
#!/bin/bash -e | |
VERSION=1.23.2 | |
PROXY="" | |
cat <<EOF > /etc/modules-load.d/containerd.conf | |
overlay | |
br_netfilter | |
EOF | |
modprobe overlay |
This file contains 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 as root | |
# create | |
mkdir -p /tmp/union/root /tmp/union/tmp | |
unionfs-fuse -o cow,dev,suid,allow_other /tmp/union/tmp=RW:/=RO /tmp/union/root | |
mount --bind /dev /tmp/union/root/dev | |
mount --bind /sys /tmp/union/root/sys | |
mount --bind /proc /tmp/union/root/proc | |
# enter |
This file contains 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
package main | |
import ( | |
"encoding/json" | |
"errors" | |
"fmt" | |
"reflect" | |
) | |
type N struct { |
This file contains 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
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
/** | |
* Respond to the request | |
* @param {Request} request | |
*/ | |
async function handleRequest(request) { | |
url = new URL(request.url) |
This file contains 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
package main | |
import ( | |
"golang.org/x/net/ipv4" | |
"log" | |
"net" | |
"os" | |
"strconv" | |
"strings" | |
"syscall" |
This file contains 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 python3 | |
import argparse | |
import ipaddress | |
import os | |
INTERNAL_SUBNET = "192.168.0.0/24" | |
INTERNET_ADDRESS = "1.2.3.4" | |
INTERFACE = "vmbr0" | |
NewerOlder