Skip to content

Instantly share code, notes, and snippets.

View HacDan's full-sized avatar
:octocat:
Focusing

David McClellan HacDan

:octocat:
Focusing
View GitHub Profile
@HacDan
HacDan / heic2jpg.sh
Created March 1, 2024 01:34
HEIC 2 JPG using ImageMagick
#!/bin/sh
file="$(basename -- $1)"
magick convert $1 "${file%.*}.jpg"
@HacDan
HacDan / fssh.sh
Last active February 29, 2024 20:00
Fuzzy SSH from ssh config
#!/bin/sh
ssh $(cat ~/.ssh/config | grep "Host " | awk '{print $2}' | fzf)

How to install SSH and Load Public Keys

Install OpenSSH Server

  1. Open Admin PowerShell
  2. Run the following command
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
  1. Enable the services
Set-Service -Name ssh-agent -StartupType `Automatic`
#!/bin/sh
curl -sS http://ip-api.com/json/$1 | jq -r '"City: " + .city + " State: " + .region + " Country: " + .country'
' VBS Script to get the Windows(R) 7 Product Key from a PC's registry.
'
' Save the VBScript as "getWin7Key.vbs" somewhere on your Windows7 PC.
' Now, when you double-click the local script file an alertbox pops up
' displaying the product key stored in the machine's Windows registry.
Set WshShell = WScript.CreateObject("WScript.Shell")
KeyPath = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"
MsgBox ExtractKey(WshShell.RegRead(KeyPath))