Skip to content

Instantly share code, notes, and snippets.

View rickhenderson's full-sized avatar

Rick Henderson rickhenderson

View GitHub Profile
@rickhenderson
rickhenderson / jscriptsc.js
Created January 23, 2024 21:04 — forked from nek0y4nsu/jscriptsc.js
Janky Old JScript.NET Shellcode Runner
import System;
import System.Runtime.InteropServices;
import System.Reflection;
import System.Reflection.Emit;
import System.Runtime;
import System.Text;
//C:\Windows\Microsoft.NET\Framework\v2.0.50727\jsc.exe Shellcode.js
//C:\Windows\Microsoft.NET\Framework\v4.0.30319\jsc.exe Shellcode.js
@rickhenderson
rickhenderson / APIs
Created April 21, 2022 16:32 — forked from JohnLaTwC/APIs
Short List of APIs seen in VBA
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare PtrSafe Function GetCurrentProcessId Lib "kernel32" () As Long
Public Declare Function Keio2 Lib "kernel32" Alias "LoadLibraryW" (ByVal lpLibFileName As String) As Long
Public Declare Function VEEAAM2 Lib "kernel32" Alias "LoadLibraryW" (ByVal lpLibFileName As String) As Long
Public Declare Function wspPush2 Lib "kernel32" Alias "LoadLibraryW" (ByVal lpLibFileName As String) As Long
Declare Function GetLogicalDrives& Lib "kernel32" ()
Declare Function GetShortPathName Lib "Kernel32.dll" Alias _
Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" ( _
Declare Function GlobalAlloc Lib "kernel32" (ByVal wFlags As Long, ByVal dwBytes As Long) As Long
Declare Function GlobalLock Lib "kernel32" (ByVal hMem As Long) As Long
@rickhenderson
rickhenderson / psCompress.ps1
Created March 23, 2022 17:35 — forked from jesusninoc/psCompress.ps1
Powershell: Compress and decompress byte array
# Compress and decompress byte array
function Get-CompressedByteArray {
[CmdletBinding()]
Param (
[Parameter(Mandatory,ValueFromPipeline,ValueFromPipelineByPropertyName)]
[byte[]] $byteArray = $(Throw("-byteArray is required"))
)
Process {

Header 1

Header 2

Header 3 ### (Hashes on right are optional)

Header 4

Header 5

Markdown plus h2 with a custom ID ## {#id-goes-here}

Link back to H2

This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one

@rickhenderson
rickhenderson / astar.py
Last active April 15, 2021 19:47 — forked from jamiees2/astar.py
A* Algorithm implementation in Python3.
"""
A* Algorithm implementation in Python.
Written by: James Sigurðarson (jamiees2)
Source: https://gist.github.com/jamiees2/5531924
Modified by Rick Henderson
May 5, 2016: Began updating to Python 3.x. Also improved spacing and comments.
Converted xrange() to range(). Converted raw_input() to input().
"""
# mandelbrot_vectorized.R
# Myles Harrison
# http://www.everydayanalytics.ca
# parameters
cols <- colorRampPalette(c("blue","yellow","red","black"))(11)
xmin = -2
xmax = 2
nx = 500
ymin = -1.5