Skip to content

Instantly share code, notes, and snippets.

View StevenMapes's full-sized avatar

Steven Mapes StevenMapes

View GitHub Profile
@StevenMapes
StevenMapes / aws-cli on unraid.sh
Created January 3, 2024 10:37
Using the AWS-CLI on Unraid via the User Scripts plugin
#!/bin/bash
# Setup
## Create the .config and .credentials file on the NAS storage E.G. /root/.aws
## The path will be mounted at the point you run the container so that the AWS CLI can use the credentials
# Always use the latest CLI
docker pull amazon/aws-cli:latest
# Examples
@StevenMapes
StevenMapes / jpg_extract.py
Created February 18, 2021 14:20
Extract JPG from pdf
import sys
with open("test.pdf", "rb") as f:
pdf = f.read()
startmark = b"\xff\xd8"
startfix = 0
endmark = b"\xff\xd9"
endfix = 2
i = 0
@StevenMapes
StevenMapes / DateTime
Last active October 22, 2020 15:31 — forked from pbaruns/DateTime
Insert Date Time
/**
* Add four days to the given date
*/
function add_days(a_date) {
a_date.setDate(a_date.getDate() + 4)
return a_date
}
/**
* The onOpen function runs automatically when the Google Docs document is
@StevenMapes
StevenMapes / findelevate.py
Last active May 30, 2017 13:48 — forked from riyazwalikar/findelevate.py
Python script to find all Windows binaries with autoElevate=True (uses sigcheck obviously)
# Python3 compatible version
# Usage: findelevate.py C:\Windows\System32\
# Needs sigcheck.exe in path [https://technet.microsoft.com/en-us/sysinternals/bb897441.aspx]
import sys
import os
import glob
import subprocess
if len(sys.argv) < 2: