Skip to content

Instantly share code, notes, and snippets.

Avatar

Foster Snowhill Forst

View GitHub Profile
@Forst
Forst / crypto.py
Created Mar 27, 2019
Домашняя работа по криптографии, Московский политех
View crypto.py
#!/usr/bin/env python3
from abc import ABC, abstractmethod
from hashlib import sha256
from math import ceil
from secrets import token_bytes, randbits, randbelow
def bit(value, index):
return (value & (2**index)) >> index
@Forst
Forst / xca.pin-always.log
Created Jun 28, 2018
XCA PKCS#11 Yubikey 4 signing
View xca.pin-always.log
DB driver: "QSQLITE"
DB driver: "QMYSQL"
DB driver: "QMYSQL3"
DB driver: "QODBC"
DB driver: "QODBC3"
DB driver: "QPSQL"
DB driver: "QPSQL7"
Available Remote DB Drivers: 2
"QMYSQL3"
"QPSQL7"
@Forst
Forst / letsencrypt.sh
Last active Mar 23, 2018
Let's Encrypt webroot updater (nginx)
View letsencrypt.sh
#!/bin/sh
updatecert () {
/usr/bin/letsencrypt certonly \
--noninteractive \
--webroot \
--keep-until-expiring \
--expand \
--agree-tos \
--strict-permissions \
View keybase.md

Keybase proof

I hereby claim:

  • I am Forst on github.
  • I am forst (https://keybase.io/forst) on keybase.
  • I have a public key whose fingerprint is B65D E21E 46E7 02CC EAE8 485A 1EDF C2BE F93E 367C

To claim this, I am signing this object:

@Forst
Forst / build.sh
Last active Jun 11, 2020
Ubuntu ISO with preseed.cfg generation script
View build.sh
#!/bin/bash
## FORSTWOOF UBUNTU PRESEED :: BUILD SCRIPT
# Quit on first error
set -e
# Temporary directory for the build
TMP="/var/tmp/ubuntu-build"
@Forst
Forst / gpg-agent.conf
Last active Aug 18, 2016
My GPG configuration
View gpg-agent.conf
default-cache-ttl 3600
pinentry-program /usr/local/bin/pinentry-mac
View Preferences.sublime-settings
{
"always_show_minimap_viewport": true,
"auto_complete_commit_on_tab": true,
"auto_find_in_selection": true,
"caret_extra_bottom": 0,
"caret_extra_top": 0,
"caret_extra_width": 0,
"close_windows_when_empty": false,
"color_scheme": "Packages/ayu/ayu-dark.tmTheme",
"default_line_ending": "unix",
You can’t perform that action at this time.