Skip to content

Instantly share code, notes, and snippets.

View kseistrup's full-sized avatar
💭
🌈

Klaus Alexander Seistrup kseistrup

💭
🌈
View GitHub Profile
import urllib2, re, json, os, time, sys, HTMLParser
html_parser = HTMLParser.HTMLParser()
auth_address = "1KbV1e1u6P6AsY8XNBydgtbtN8iSB5WMyG"
auth_privatekey = "xxxx"
site = "1TaLkFrMwvbNsooF4ioKAY9EuxTBTjipT"
zeronet_dir = ".."
os.chdir(zeronet_dir)
@ageis
ageis / systemd_service_hardening.md
Last active April 19, 2024 23:47
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active April 4, 2024 05:54
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@MineRobber9000
MineRobber9000 / 2fa
Created April 3, 2020 03:45
2-factor authentication terminal app in Python
#!/usr/bin/env python
import os, os.path, stat, sys, base64
# TOTP lib inlined
import time, hmac, base64, hashlib, struct
def pack_counter(t):
return struct.pack(">Q", t)
#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.