Skip to content

Instantly share code, notes, and snippets.

View cpuschma's full-sized avatar

Christopher Puschmann cpuschma

  • Germany
  • 00:23 (UTC +02:00)
View GitHub Profile
# Iptables
iptables -A INPUT -m bpf --bytecode "$(tcpdump -y RAW -ddd icmp | tr '\n' ',' | sed 's/,$//')" -j DROP -m comment --comment "icmp"
# Nftables
# TODO
@cpuschma
cpuschma / install-podman.sh
Last active July 4, 2021 12:35
Install podman on Debian 10 (Buster)
#!/bin/bash
echo 'deb http://deb.debian.org/debian buster-backports main' | tee -a /etc/apt/sources.list
echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /' | tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
wget -O- https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/Release.key | apt-key add -
apt-get update
apt-get install -y -t buster-backports libseccomp2
apt-get install -y containernetworking-plugins apparmor apparmor-utils auditd podman
package main
import (
"fmt"
"testing"
)
/*
goos: windows
@cpuschma
cpuschma / lernsax-with-seconds.js
Last active April 16, 2020 15:56
Lernsax sekunden genau
(() => {
const doc = window.document.querySelector("iframe").contentDocument || window.document;
for (const entry of doc.querySelectorAll(".c_c_date")) {
if (typeof entry.attributes.sort !== "undefined") {
const originalText = entry.innerHTML,
createdAt = new Date(0);
createdAt.setUTCSeconds(entry.attributes.sort.value);
entry.innerHTML = `${createdAt.toLocaleDateString()} ${createdAt.toLocaleTimeString()}` + entry.innerHTML.substring(16);
}