Skip to content

Instantly share code, notes, and snippets.

View james-martinez's full-sized avatar

James Martinez james-martinez

View GitHub Profile
@james-martinez
james-martinez / copy_paste.ps1
Created October 29, 2025 07:25
Windows PowerShell paste clipboard as keystrokes
# Add the necessary assembly to use SendKeys
Add-Type -AssemblyName System.Windows.Forms
# A short delay to give you time to focus the window where you want to paste
Start-Sleep -Seconds 3
# Get the text from the clipboard
$textToCopy = Get-Clipboard
# Simulate Ctrl+V to paste
@james-martinez
james-martinez / clipboard_to_keystrokes.py
Last active September 15, 2025 15:21
Clipboard to Keystrokes in Python3
#!/usr/bin/env python3
"""
Clipboard to Keystrokes Script
Reads text from clipboard and types it out as keystrokes
"""
import pyperclip
import pyautogui
import time
import sys
@james-martinez
james-martinez / pfblockerng.patch
Last active August 19, 2025 17:06
pfsense pfblockerng 3.2.8 disable reverse lookup
--- a/b/usr/local/pkg/pfblockerng/pfblockerng.inc
+++ a/b/usr/local/pkg/pfblockerng/pfblockerng.inc
@@ -1,7 +1,7 @@
- $resolved_host = gethostbyaddr($host) ?: 'Unknown';
- if ($host == $resolved_host || $resolved_host == 'Unknown') {
+ //$resolved_host = gethostbyaddr($host) ?: 'Unknown';
+ //if ($host == $resolved_host || $resolved_host == 'Unknown') {
$resolved_host = 'Unknown';
- } else {
- $resolved_host = pfb_filter($resolved_host, PFB_FILTER_HOSTNAME, 'pfb_daemon_filterlog', 'Unknown');
@james-martinez
james-martinez / add-dod-certs-termux.sh
Last active October 15, 2025 15:30 — forked from AfroThundr3007730/add-dod-certs.sh
Import DoD root certificates into CA store
#!/data/data/com.termux/files/usr/bin/bash
# run in termux
# cd /sdcard/Download/ ; curl https://gist.github.com/james-martinez/fd1837faf21613123128f34ef4beb451/raw/9ba79c281850a8a826899b56d9b79414cd0ca44f/add-dod-certs-termux.sh| bash
# Install required packages
packages=(
"curl"
"unzip"
"openssl"
#!/bin/bash
# Miniconda for python3 | https://docs.conda.io/en/latest/miniconda.html
# - Upgrade pip
# - Ansible , pip
# - Curl, conda
# - Git, conda
# - Terraform, conda forge
# - Packer, conda forge
# - Gnupg, conda forge