Skip to content

Instantly share code, notes, and snippets.

View Mitch1000's full-sized avatar

Mitchell Drohan Mitch1000

View GitHub Profile
@Mitch1000
Mitch1000 / themegen.lua
Last active July 25, 2025 17:56
-- Match a highlight color from a vim colorscheme to an existing lua color scheme
-- Match a highlight color from a vim colorscheme to an existing lua color scheme
data = require('backpack.theme_data')
---local data = {
--- ALEErrorSign = { fg = '#d6a477', bg = '#3a3a3a' },
---}
local M = {}
local function setup()
@Mitch1000
Mitch1000 / macosxprovisioning.conf
Last active April 2, 2025 02:08
Leaf Certificate OpenSSL Config File Example for Code Signing
[ req ]
prompt = no
days = 365
req_extensions = v3_req
distinguished_name = req_distinguished_name
[ ca ]
default_ca = worldwide
[ worldwide ]
@Mitch1000
Mitch1000 / worldwide.conf
Last active April 2, 2025 02:07
Intermediate Certificate Authority Example OpenSSL Config File
[ req ]
prompt = no
days = 365
distinguished_name = req_distinguished_name
req_extensions = v3_req
[ req_distinguished_name ]
commonName = "Apple Worldwide Developer Relations Certification Authority"
countryName = US
organizationName = "Apple Inc."
@Mitch1000
Mitch1000 / generate_apple_certs.sh
Created April 2, 2025 02:03
Generate Self-signed Apple Provisioning Profile Certificates
#!/bin/bash
#
set -e
# Generate Self Signed Certificate Chain for Code signing and provision profile signing.
# NOTE: These certificates will not be trusted by the device if they are not set as
# trusted (and in the case of driver kit development the Apple Root certificate must be an
# Anchor Certificate
@Mitch1000
Mitch1000 / Uint64ToHexArray.cpp
Created April 2, 2025 01:28
Uint64ToHexArray
// Covert a uint64_t to an unsigned char array
unsigned char* uint64ToHexArray(uint64_t value, unsigned char* hexArray, size_t arraySize)
{
// Ensure the array is large enough to hold 8 bytes (uint64_t is 8 bytes)
if (arraySize < 8) {
return hexArray;
}
// Extract each byte of the uint64_t value and store it in the hexArray
for (size_t i = 0; i < arraySize; ++i) {
@Mitch1000
Mitch1000 / and_equals_bitmatcher.cpp
Last active April 2, 2025 01:22
C++ AND Equals Bit Matcher
// Use hasMatchingBits Compare each bit in a 16 bit integer to a comparator.
// Do an AND operation with each bit in the comparator against the corresponding bit in
// the set bit value and return true if the result of each AND operation is 1
class BitMatcher
{
public:
BitMatcher(uint16_t bitValue) {
value = bitValue;
@Mitch1000
Mitch1000 / signing_local_provision_profile.sh
Last active April 2, 2025 01:26
Signing a Local Apple Provision Profile with self Signed Certificates
#!/bin/bash
#
# Used to Self sign a code provisioning profile to grant an apple app (MacOSX, IOS etc.)
# it's entitlements.
# Where AppleRootCACert is a self signed root certificate authority generated my openssl
#
# AppleWorldwideDeveloperRelationsCertificationAuthorityCert is an intermediate certificate authority
# signed by the AppleRootCACert private key.
Email mitt.brohan@yahoo.ca for any questions regarding bugs with the add-in
Our company operates the Copy Sections Word add-in. This page informs you of our policies regarding the collection, use, and disclosure of personal data when you use our App and the choices you have associated with that data.
We do not collect any personal information when you use the App.
The App may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by us. Therefore, we strongly advise you to review the Privacy Policy of these websites. We have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party sites or services.
We do not knowingly collect personally identifiable information from anyone under the age of 13. If you are a parent or guardian and you are
cd C:/Users/Administrator/
type NUL > rtffile.rtf # also echo. 2>rtffile.rtf copy nul file.txt > nul # also in qid's answer below REM. > empty.file fsutil file createnew file.cmd 0 # to create a file on a mapped drive
bitsadmin /Transfer mydownloadjob /download /priority normal https://upload.wikimedia.org/wikipedia/commons/3/3c/Enrique_Simonet_-_Marina_veneciana_6MB.jpg C:\Users\Administrator\maxfilesize.jpg