Skip to content

Instantly share code, notes, and snippets.

Jacob Hands jahands

Block or report user

Report or block jahands

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gen-zoomlevels.py
from PIL import Image
import multiprocessing as mp
import os, math, sys
folder = "C:/Users/jh/AppData/Roaming/Factorio/script-output/FactorioMaps/" + sys.argv[1] + '/Images/'
ext = ".jpg"
maxthreads = mp.cpu_count()
@jahands
jahands / Backup-FactorioSaves.ps1
Last active May 25, 2018
Backup Factorio saves
View Backup-FactorioSaves.ps1
<#
.SYNOPSIS
Backs up Factorio save / autosaves
.PARAMETER SaveName
The name of the save file (excluding the .zip extension)
.PARAMETER Auto
Auto backup new saves as you're playing
.PARAMETER SavesPath
Path to Factorio save files.
@jahands
jahands / AddItem.ps1
Last active Sep 28, 2017
PowerShell database class
View AddItem.ps1
[JhaContentDB]::new($dbPath).Load().Add($item).Save().Close()
@jahands
jahands / Remove-Windows10JunkApps.ps1
Created Sep 25, 2017
Removes a few apps that come with Windows 10. To use, copy/paste into PowerShell and hit Enter.
View Remove-Windows10JunkApps.ps1
@(
'Microsoft.Messaging'
'Minecraft'
'Netflix'
'Microsoft.MicrosoftOfficeHub'
'Microsoft.OneConnect'
'Microsoft.Office.OneNote'
'Microsoft.People'
'Microsoft.WindowsPhone'
'Microsoft.Windows.Photos'
@jahands
jahands / boxstarter.ps1
Created Sep 20, 2017
Boxstarter Commands for a new Windows box.
View boxstarter.ps1
$auPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\{8FA01A01-4B9C-4A5F-9E4B-5242B1CA676A}Machine\Software\Policies\Microsoft\Windows\WindowsUpdate\AU"
New-Item $auPath -Force
Set-ItemProperty -Path $auPath -Name NoAutoRebootWithLoggedOnUsers -Type DWord -Value 1 -Force
View Passwords.ps1
Function Send-PasswordHashesToDiscord {
<#
.SYNOPSIS
Sends password hashes from dump to Discord
#>
Param (
[string]$LastHash,
[switch]$FirstRun
)
$path = 'V:\NOBACKUP\TMP\pwned-passwords-1.0.txt'
View rail_2
0eNrt3U/T3baZpvHvorXVxRskQDK7Xsx2Nt2LqZpKuWTn7UTVsuxSlEwyXfruI1l/LEuHPPgdnLeSrvEqFfvlY/AABC4+eIjrv5589+IvDz+9ev7y9bff/fjjfz753X/98k/+/OR3//uz//vu3z3//seX7//xn5//8eWzF+/+2eu///Tw5HdPnr9++OHJN09ePvvh3f979ez5iydvvnny/OUfHv725Hd5882FS/76/NXrv7z9J5+uev8XT5fPrix0ZfnsyvnN77958vDy9fPXzx/et/nn//P3b1/+5YfvHl69bdQvV79+294//un105+b/c2Tn37889urfnz57r/4NtLTLN88+fu7/53ehv/D81cP37//tz837ouopT9q6Y8690ed+qMu3VG3/qC1O2jrD9q6g0JXrd1Boae2T0G//8urvz784SDk/D7i/uuA84WA+68eqqcfnoVLg/Rf6vug27/UX4dtF8K+Gyc9Dd3fx/wi4nopoj9Qy/XfM/5A9UT1B6onKj9QPUH5geoJyg9UT1B+oHqCbr1BoZ/23pj97SxTb8z+H7R0P1H9PV+6n6f+IVq6nyZ4mEr3wwTPfel+mGCKKo2n6NIzRZdfnqfvnv/x6cOLt3/86vn3T3/68cXDGaW8uRRr62tjZmviLk08beE89f6KH5s4fdnCi+SUzhtfKGrRta50BJ11qesJuuhK1xO04kLXE7PhOtcTc8VlrifmhqtcT8zdFrmOkMtka1xPyNgS1xOyCIXO1yekZbYls6eNi62YPSErLpg9MRuulz0xV1wue2LSG9LaEXDXhaP1TPF10il+6wganeJ7ghad4nuCzjjF98RccIrviVlxiu+J2XCK/yrm7795nxD73Wf5s2+evHj23cOLD8P024+Rv12+LW//3V8fXv35/ay2LKWmLds0/5LMmt61sjcVd5Qd+183Z+TKrzJy98urfQD3Ut6cZtKuPNbTJ2TNlw/2cppL66Hq/ayJS2cT108tfEfV90iaXW5P859+ejOUGWt
View gist:1c2a7007689a6586a1b46117868f8967
<html>
<head>
<script type="text/javascript">
function getCookie(name) {
var matches = document.cookie.match(new RegExp(
"(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
));
return matches ? decodeURIComponent(matches[1]) : undefined;
}
@jahands
jahands / docker-compose.yml
Created Feb 15, 2017
ArchiveTeam Warrior via Docker Compose
View docker-compose.yml
version: '3'
services:
warrior:
restart: on-failure
image: archiveteam/warrior-dockerfile
ports:
- "8001:8001"
@jahands
jahands / dupliciti-backup.sh
Created Dec 18, 2016
Backup your /home to B2
View dupliciti-backup.sh
#!/bin/bash
if [ -f ~/.bash_secrets ]; then
. ~/.bash_secrets
fi
duplicity $1 --no-encryption \
--include '/home/*/.dotfiles' \
--exclude '/home/*/.*' \
--exclude '/home/*/Downloads' \
--exclude '/home/*/.ecryptfs' \
You can’t perform that action at this time.