Skip to content

Instantly share code, notes, and snippets.

@blark
blark / build.zig
Last active February 17, 2024 05:25
build.zig for mmdvmhost
const std = @import("std");
const builtin = @import("builtin");
const mem = std.mem;
const fs = std.fs;
const ArrayList = std.ArrayList;
pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
@blark
blark / Tasmota ESP32-S2.md
Last active March 30, 2022 17:40
Compiling and flashing Tasmota ESP32-S2
@blark
blark / oktapussy.sh
Last active April 1, 2023 13:08
Making an OktaPussy ROM for Amiga
#!/bin/bash
# Download and decompress the prerequisite files and put them in the directory with this script:
#
# 1. "OKT612.ROM"
# "Oktagon 2008 SCSI Controller 6.12 ROM 27256"
# http://kickstart.ddns.net/Hardware-Software%20Amiga/Hardware/Rom%20Archive/romwebby/okt612.rar
#
# 2. "at" (OktaPussy/Expansion/at):
# http://aminet.net/disk/misc/oktapus.lha
#
@blark
blark / byteswap.py
Created December 10, 2019 18:59
A quick and dirty Python 3 script to byteswap an Amiga ROM
#!/usr/bin/env python3
import argparse
parser = argparse.ArgumentParser(description="Byteswap an Amiga 500 ROM file")
parser.add_argument("infile", type=str, help="the ROM file to convert")
parser.add_argument("outfile", type=str, help="filename to output")
args = parser.parse_args()
with open(args.infile, "rb") as f:
@blark
blark / gencert.py
Created May 23, 2019 01:46 — forked from toolness/gencert.py
Python script to create server SSL certs and sign them with a custom CA.
#! /usr/bin/python
"""
This simple script makes it easy to create server certificates
that are signed by your own Certificate Authority.
Mostly, this script just automates the workflow explained
in http://www.tc.umn.edu/~brams006/selfsign.html.
Before using this script, you'll need to create a private
@blark
blark / forcefully_remove_mdm_1013.sh
Created March 8, 2019 06:10 — forked from opragel/forcefully_remove_mdm_1015.sh
forcefully_remove_mdm_1013.sh
#!/bin/bash
# Seriously there still apparently aren't enough warning labels
# If you don't understand the consequences don't do it
# ################
# #### May cause 10.13.2+ machines that were DEP-enrolled to not be considered as such
# ################
# but really, you shouldn't do this
# one local user enabled for MDM come on apple
# ¯\_(ツ)_/¯
#
# A bunch of MSSQL shortcuts
#
Import-Module Sqlps -DisableNameChecking
function Get-Databases {
Invoke-Sqlcmd -Query "sp_databases"
}
@blark
blark / gist:a21f9677196f137506a082ad379e5edd
Last active July 12, 2018 20:11
Powershell to Convert disk to StandardSSD_LRS in Azure
$diskName = 'yourDiskName'
$rgName = 'yourResourceGroupName'
$storageType = 'StandardSSD_LRS'
$disk = Get-AzureRmDisk -DiskName $diskName -ResourceGroupName $rgName
# Get parent VM resource
$vmResource = Get-AzureRmResource -ResourceId $disk.ManagedBy
# Stop and deallocate the VM before changing the storage type
@blark
blark / SharpPick.cs
Created February 21, 2018 19:09 — forked from bneg/SharpPick.cs
/*
* SharpPick aka InexorablePoSH
* Description: Application to load and run powershell code via the .NET assemblies
* License: 3-Clause BSD License. See Veil PowerTools Project
*
* This application is part of Veil PowerTools, a collection of offensive PowerShell
* capabilities. Hope they help!
*
* This is part of a sub-repo of PowerPick, a toolkit used to run PowerShell code without the use of Powershell.exe
*/
@blark
blark / arc4.nim
Last active November 25, 2022 01:22
An implementation of ARC4 for Nim
## Nim implementation of ARC4 stream cipher
## https://en.wikipedia.org/wiki/RC4
## http://www.users.zetnet.co.uk/hopwood/crypto/scan/cs.html#RC4
import future
type ARC4* = object
S: seq[int]
keystream: iterator(S: var seq[int]): int