Skip to content

Instantly share code, notes, and snippets.

View miklobit's full-sized avatar

MK miklobit

View GitHub Profile
@miklobit
miklobit / party.py
Created October 3, 2022 12:08 — forked from jepler/party.py
#!/usr/bin/python3
# The MIT License (MIT)
#
# Copyright (c) 2020 Jeff Epler
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@miklobit
miklobit / weaver.py
Created November 7, 2021 23:11 — forked from Cyberax/weaver.py
#!/usr/bin/python3
# Interweave two JSON log streams
import json
import os
import sys
import time
import urllib.request
from os import getenv
from subprocess import Popen, PIPE, STDOUT, check_output, check_call, call
from sys import stdout
@miklobit
miklobit / ssh_host_rsa_key
Created November 7, 2021 23:10 — forked from Cyberax/ssh_host_rsa_key
Tesla IC cluster host key
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA8Q8ZcQ/hM8sL5/PqFqCxVAjCb8/aRcp/FMWv+C4k1CN8w00Z
aHsFbJ16mSXhhM3vD3aLiz0c+W7CIjcvAZPSc0JJolPR4eISsznm5gjfZCj5iwp1
XMW81vPfxhgrCtD3Bs2l2WHLsYp/Ou7Rkj+JVHoBiGzOuvrfowFC/tycVweRre1F
b9iVD1+j10YXeZxJ1pisDoXWRy+/TWvRf8NCfxBfjyObBLw5VJLk8NakDwHGPojQ
c9d8ET+97qGw4XnIXXrBHS8iU8TD9Vk5ckKD3V/9cqi8jYrNTYYa/6rhJc3Hafgw
7peZaiesXPui1RgMu4PR/8MepnbY81nC8kMFoQIDAQABAoIBAQC1hB4vQbrdakbD
2apqcYQ1+AaZdVUx+mIo/RcddXmr+DDpSzQXtZMHD6oSijC/9OXPqf830MPxmxI5
+3283Ve6DK8vuZgwVDCqnq4ch4/Xdvc5WJ25RviEj8zv+KDomyN4DwCUqQxd2yEk
+lH6ozdA0kI3PV+J8oDV2IxfJzXeXVGIS5zGZYGanYvc6MLeagFG3AHW8EJWFd9X
@miklobit
miklobit / ssh_host_dsa_key
Created November 7, 2021 23:09 — forked from Cyberax/ssh_host_dsa_key
Tesla IC computer private key
-----BEGIN DSA PRIVATE KEY-----
MIIBugIBAAKBgQCYfXa+HV0Fl/CTNeOximEZt/xK960Tg3J8gKj0K2QqHoQgQbxk
R7UTVADl03IoOJbDPhV6I0RS1JoEX1NWyPmCNrXOGIqfaO/jbEdNU1lYyrFaw4zI
38dJuFJY3IPfJoHxCJYB1a/N+dca3KjdXxlCxImM50Dd4Jc+H8UqCsTarQIVAN3b
f7xVPqJoSwsBQUxGubHOyQeTAoGAfW/+RTlMo2z6P3WsUL0HQ0yrH5ns01CfwLqM
/ME76IOVV4eT+Li1G34FymdCFF1PWG5VHBT190R/XxICoEliflBYMbKJL9o3Z9sD
K3uG6+Z+5B5uCR5AY1ugT0EyuztCJpg0M2voxT0VQ4rLEYd5/rfnT7bejhxtqjzy
CrhmxyoCgYBzdvNGjMNNVOvgm/wBEWYFQKixGNhMskph1MpTgYQLmXKXK5rOpufy
P3cYzQheKxtG7Dk87hkAtuzv3kI7KsSqMErXowT67taEcgYMu57O/BFNMl4MLOsv
DRGCekm8CdMiGBpmjIqKZrifJs4/CA3m3YYvPWA7n4O8RDrnBpDrvwIUL8f0zQjg
@miklobit
miklobit / eu-covid-certificate-qr-decoder.py
Created November 4, 2021 01:36 — forked from yaci/eu-covid-certificate-qr-decoder.py
Decode information from European covid19 travel certificates
#######
#
# REQUIRES: pip install cose #!!!!
#
# HOW TO USE:
# 1. Use your favourite QR scanner to scan the code from a certificate,
# you'll get a string that starts with "HC1:"
# 2. Run the script: python3 covid-qr-certificate-decoder.py
# 3. Paste the string when prompted
#
@miklobit
miklobit / tiddly_wiki.py
Created September 26, 2021 02:03 — forked from fhightower/tiddly_wiki.py
Making requests to tiddlywiki
"""Code showing how to create a tiddler in tiddly wiki using python. I was not able to get this working without the "X-Requested-With" header."""
import requests
TIDDLY_WIKI_URL = 'https://localhost:8080'
TIDDLY_WIKI_REQUEST_HEADERS = {
# this "X-Requested-With" header is the key to making these requests work
'X-Requested-With': 'TiddlyWiki',
'Content-Type': 'application/json'
}
@miklobit
miklobit / 0-letterblock.js
Created September 21, 2021 21:57 — forked from atoponce/0-letterblock.js
Improve the password generator security of https://www.draketo.de/english/secure-passwords
/*
Improves the security of https://www.draketo.de/english/secure-passwords:
- Replace the letters with the original proposal at https://www.draketo.de/software/letterblock-diceware
- All bigrams are kept, rather than truncating
- Replace Math.random() with crypto.getRandomValues()
- Replace Math.floor(Math.random() * length) with uniform modulo rejection
- Replace a character count with a minimum security margin
- The HTML "Length" input should be replaced with "Security minimum" (or something similar, in bits)
- Implement the checksum per https://www.draketo.de/software/letterblock-diceware
- Use 6 characters instead of 4 (or 7) for a uniform checksum
@miklobit
miklobit / custom.sh
Created April 29, 2021 10:14
custom ubuntu studio 18.04 configuration for live-persistent image
#!/bin/sh
#custom ubuntu studio 18.04 configuration for live-persistent image
#Run script in /tmp under cubic chrooted terminal:
#$ (./custom.sh 2>&1) | tee custom.log
add-apt-repository $1 ppa:ubuntustudio-ppa/backports
add-apt-repository $1 ppa:mkusb/ppa
add-apt-repository $1 ppa:unit193/encryption
add-apt-repository $1 ppa:thomas-schiex/blender
add-apt-repository $1 ppa:sebastian-stenzel/cryptomator
@miklobit
miklobit / 00_README.md
Created February 21, 2021 01:19 — forked from md5/00_README.md
Demonstration Docker config for Wordpress on PHP-FPM behind Nginx

Proof of concept setup for Wordpress running under PHP-FPM with an Nginx frontend

Usage

Build a copy of this image:

git clone git://github.com/d9206eacb5a0ff5d6be0.git docker-nginx-fpm
cd docker-nginx-fpm
docker build -t nginx-fpm .
@miklobit
miklobit / erc20-token-sample.sol
Created December 30, 2020 01:53 — forked from bajcmartinez/erc20-token-sample.sol
Necessary code to generate an ERC20 Token
pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
// Sample token contract
//
// Symbol : LCST
// Name : LCS Token
// Total supply : 100000
// Decimals : 2
// Owner Account : 0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe