Skip to content

Instantly share code, notes, and snippets.

View jnm2's full-sized avatar

Joseph Musser jnm2

View GitHub Profile
@HaloFour
HaloFour / Test.cs
Last active March 31, 2020 17:32
Test inheritance with struct builders
/*
public record class Person {
public required int ID { get; init; }
public string FirstName { get; init; }
public string LastName { get; init; }
Person {
if (ID < 0) throw new ArgumentOutOfRangeException(nameof(ID));
}
}
@jessfraz
jessfraz / boxstarter.ps1
Last active April 11, 2024 16:02
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@iam3yal
iam3yal / Visual Studio.xml
Last active April 9, 2020 15:29
Notepad++ Visual Studio Theme
<?xml version="1.0" encoding="Windows-1252" ?>
<!--
Theme name : Visual Studio
-->
<NotepadPlus>
<LexerStyles>
<LexerType name="sql" desc="SQL" ext="">
<WordsStyle name="KEYWORD" styleID="5" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" keywordClass="instre1" />
<WordsStyle name="NUMBER" styleID="4" fgColor="0060BF" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WordsStyle name="STRING" styleID="6" fgColor="007BEF" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
@Manouchehri
Manouchehri / rfc3161.txt
Last active June 29, 2024 22:11
List of free rfc3161 servers.
https://rfc3161.ai.moda
https://rfc3161.ai.moda/adobe
https://rfc3161.ai.moda/microsoft
https://rfc3161.ai.moda/apple
https://rfc3161.ai.moda/any
http://rfc3161.ai.moda
http://timestamp.digicert.com
http://timestamp.globalsign.com/tsa/r6advanced1
http://rfc3161timestamp.globalsign.com/advanced
http://timestamp.sectigo.com
@davidfowl
davidfowl / dotnetlayout.md
Last active July 1, 2024 15:47
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@Noitidart
Noitidart / _ff-addon-snippet-WinAPI_EnumHandlesExAndReadFilePaths.js
Last active March 9, 2020 11:12
_ff-addon-snippet-WinAPI_EnumHandlesExAndReadFilePaths - Trying to read file paths of handles returned from a PID that is not equal to the PID of where the code is running from. (js-ctypes) (Windows)
Cu.import('resource://gre/modules/ctypes.jsm');
var lib = {
ntdll: ctypes.open('ntdll.dll'),
kernel32: ctypes.open('kernel32.dll'),
}
//HANDLE WINAPI GetCurrentProcess(void);
var GetCurrentProcess = lib.kernel32.declare("GetCurrentProcess", ctypes.winapi_abi, ctypes.voidptr_t);
//DWORD WINAPI GetCurrentProcessId(void);
@Noitidart
Noitidart / _ff-addon-snippet-WinAPI_EnumHandles.js
Last active March 9, 2020 11:12
_ff-addon-snippet-WinAPI_EnumHandles - Enumerate handles WinAPI. (js-ctypes) (Windows)
Cu.import("resource://gre/modules/ctypes.jsm");
var lib_ntdll = ctypes.open("ntdll.dll");
var lib_kernel32 = ctypes.open("kernel32.dll");
var STATUS_BUFFER_TOO_SMALL = 0xC0000023>>0;
var STATUS_INFO_LENGTH_MISMATCH = 0xC0000004>>0;
var SystemHandleInformation = 16;
var UNICODE_STRING = new ctypes.StructType("UNICODE_STRING", [
{'Length': ctypes.unsigned_short}, //USHORT
@Noitidart
Noitidart / _ff-addon-snippet-WinAPI_NtDll.js
Last active March 9, 2020 11:12
_ff-addon-snippet-WinAPI_NtDll - Demonstrating some capabilities of ntdll. [jsctypes] [windows]
Cu.import("resource://gre/modules/ctypes.jsm");
var lib_ntdll = ctypes.open("ntdll.dll");
var lib_kernel32 = ctypes.open("kernel32.dll");
var _pPID = null;
var STATUS_BUFFER_TOO_SMALL = 0xC0000023>>0;
var STATUS_INFO_LENGTH_MISMATCH = 0xC0000004>>0;
var SystemProcessInformation = 5;
var SystemBasicInformation = 0;
var SystemProcessorPerformanceInformation = 8;