Skip to content

Instantly share code, notes, and snippets.

View Calvindd2f's full-sized avatar
:electron:
exponential potential

Calvindd2f

:electron:
exponential potential
View GitHub Profile
@Calvindd2f
Calvindd2f / Setup-DeEnvironment.ps1
Last active August 18, 2025 22:13
Calvins Neovim Configuration
# Setup-DevEnvironment.ps1
# Find the latest Visual Studio installation
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$vsPath = & $vswhere -latest -property installationPath
if (-not $vsPath) {
Write-Error "Visual Studio installation not found. Please ensure Visual Studio Build Tools are installed."
exit 1
}
@Calvindd2f
Calvindd2f / collect_wsl_logs.ps1
Created April 1, 2024 05:21
wsl debugging or more like unfucking
#Requires -RunAsAdministrator
[CmdletBinding()]
Param (
$LogProfile = $null,
[switch]$Dump = $false
)
Set-StrictMode -Version Latest
@Calvindd2f
Calvindd2f / ANPR_detection.py
Created February 24, 2024 14:23
This code can be used for legitimate purposes such as improving the accuracy of ANPR systems or developing vision-based transportation applications. This code detects license plates by applying Gaussian blur, edge detection, dilation, and erosion to the input image. It then finds contours in the edge map and filters out the ones that have an asp…
import cv2
# Example code that detects license plates in an image:
# Load the image and convert it to grayscale
image = cv2.imread('license_plate.jpg')
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
# Apply Gaussian blur to the grayscale image
gray = cv2.GaussianBlur(gray, (5, 5), 0)
# Function to calculate the annual costs of the licenses assigned to a user account
Function Get-LicenseCosts {
[CmdletBinding()]
param (
[array]$Licenses
)
[int]$Costs = 0
foreach ($License in $Licenses) {
$LicenseCost = $PricingHashTable[$License]
if ([float]$LicenseCost) {
@fOmey
fOmey / README.md
Last active December 12, 2024 21:42
WSL : nl80211 not found fix & 8814au drivers

WSL : nl80211 not found fix & 8814au drivers

Quick facts

  • Do not save kernel source to a /mnt/c path, compile from the linux user home directory. Windows is case-insensitive, will cause random "file not found" compilation errors.
  • I'm using the Kali Windows store installation to do all these steps, this is especially important if you plan on using 8814au drivers (I don't believe they are compatible with Ubuntu)
  • Windows 10, latest windows updates & WSL.
  • The steps related to 8814au drivers can be modified as necessary.
  • For changes to take effect, WSL requires the "6 second rule" between restarts when modifying WSL related configuration files. Meaning if you issue a wsl --shutdown wait 6 seconds before issuing wsl.
@yan-foto
yan-foto / 0-README.txt
Last active March 30, 2025 20:16
DeDRM Adobe Digital Edition Books
Convenient DeDRM Scripts
-------------------------
**NOTE**: read https://blog.quaintous.com/2021/02/16/remove-drm-from-ebooks/ to find out what this gist is good for.
* ./init.sh: extracts Adobe Digital Editions private key and required files to DeDRM.
* ./dedrm: removes DRM from given ebook (pdf/epub)
If you are using this for the first time, make sure that you have authenticated your Adobe Digital Editions (ADE) and run './init.sh'. Import any DRM-protected file into ADE and run 'dedrm.sh':
@danvy
danvy / WSL2-Net-Fix.ps1
Created September 5, 2020 21:04
Reset your WSL network connection trying to fix WSL2 media disconnected error
# Check these threads before proceeding:
# https://github.com/microsoft/WSL/discussions/5857
# https://github.com/microsoft/WSL/issues/5821
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
$CmdLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CmdLine
Exit
}
# Restart the Host Network Service
Restart-Service -Force -Name hns
@jthuraisamy
jthuraisamy / loaded_psp_drivers.cpp
Last active June 19, 2025 17:45
Loaded Security Product Drivers
#include <Windows.h>
#include <ImageHlp.h>
#include <strsafe.h>
#include "loaded_psp_drivers.h"
#include <set>
#include <string>
#include <algorithm>
#pragma comment(lib, "crypt32.lib")
@mgeeky
mgeeky / Various-Macro-Based-RCEs.md
Last active July 15, 2025 12:45
Various Visual Basic Macros-based Remote Code Execution techniques to get your meterpreter invoked on the infected machine.

This is a note for myself describing various Visual Basic macros construction strategies that could be used for remote code execution via malicious Document vector. Nothing new or fancy here, just a list of techniques, tools and scripts collected in one place for a quick glimpse of an eye before setting a payload.

All of the below examples had been generated for using as a remote address: 192.168.56.101.

List:

  1. Page substiution macro for luring user to click Enable Content
  2. The Unicorn Powershell based payload
2070 Paradigm Shift Transcript
Transcribed by Edwin Finch
Sam, you're a legend. Enjoy
==============================
Whew.
Hey.