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/sh | |
set -o errexit | |
kernel_release=$(uname -r) | |
private_key_file="private_key.pem" | |
public_key_file="public_key.der" | |
find /lib/modules/"${kernel_release}" -name 'vbox*.ko' | while read -r module_path; do | |
module_name=$(basename -s .ko ${module_path}) | |
echo "Signing ${module_name} ..." |
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 python:3-alpine as builder | |
RUN apk add --no-cache gcc python3-dev libffi-dev openssl-dev build-base | |
RUN pip3 install cryptography | |
FROM python:3-alpine as release | |
COPY --from=builder /root/.cache /root/.cache |
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
use std::fmt; | |
#[derive(Copy,Clone)] | |
enum CellState { Dead, Alive } | |
impl fmt::Display for CellState { | |
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | |
let printable = match *self { | |
CellState::Alive => 'x', | |
CellState::Dead => ' ', |
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
import os | |
import re | |
import sys | |
class ReferenceCollector: | |
def __init__(self, pattern, ignored_files): | |
self.files = {} | |
self.ignored_files = ignored_files | |
self.PATTERN = pattern | |
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 http.server import BaseHTTPRequestHandler | |
class PostHandler(BaseHTTPRequestHandler): | |
def do_POST(self): | |
self.answer() | |
self.print_delimiter() | |
self.print_request_header() | |
self.print_request_body() |
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
import re | |
import sys | |
PATTERN = re.compile("INSERT INTO ([\w_\.]+) \(([\w,\"]+)\) VALUES \(([\w ,:'\.\(\)]+)\);$", flags=re.IGNORECASE) | |
TO_DATE_PATTERN = "to_date\(('[0-9 :\.]+'),'DD.MM.RR HH24:MI:SS'\)" | |
def convert(filename): | |
with open(filename) as source_file: | |
output = None | |
current_table_name = None |
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
cgdisk /dev/sda | |
----------------- | |
sda1 512M EF00 | |
sda2 200M 8300 | |
sda3 rest 8300 | |
cryptsetup -c aes-xts-plain -y -s 512 luksFormat /dev/sda2 | |
cryptsetup luksOpen /dev/sda2 cryptroot | |
pvcreate /dev/mapper/cryptroot | |
vgcreate vg /dev/mapper/cryptroot |