This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prompt user for a pattern | |
$pattern = Read-Host "Enter the regular expression to search for in the certificate subject" | |
# Get the certificates matching the pattern. | |
$certificates = Get-ChildItem -Recurse Cert:\LocalMachine\ ` | |
| Where-Object PSIsContainer -eq $false ` | |
| Where-Object Subject -cmatch $pattern | |
# Check if any certificates match the pattern. | |
if ($certificates.Count -eq 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTES | |
# - Credit goes to @adamrehn for https://github.com/adamrehn/gdb-multiarch-windows, | |
# which much of this script is based upon. | |
# - `texinfo` may need to be installed on your system, otherwise the GDB | |
# build process may fail. | |
# - If any of the build processes fail due to problems such as missing | |
# dependencies, the entire build directory must usually be wiped, even if | |
# `configure` completed successfully. Otherwise `configure` and `make` will | |
# used cached information (and not pick up on any fixes). | |
bash set -euo pipefail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@findstr/v "^@f.*&" "%~f0" | powershell -NoProfile -ExecutionPolicy Bypass - & pause & goto:eof | |
# The above line allows running this file as a batch file, to overcome the | |
# need for execution policy changes. | |
# Note, when making changes to this script, testing needs to be done under the | |
# version of PowerShell that comes with Windows (PowerShell v5), as that is | |
# what most users will have access to. | |
# ## Constants ## # | |
$OUT_FILE_PATH = "${env:temp}\BG3 Installation Data.txt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import codecs | |
import sys | |
from editdistance import eval as distance | |
from pprint import pprint | |
import re | |
def sort_phrases(phrase_list): | |
result = [] | |
result.append(phrase_list.pop()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TARGET_FUNCTION_PREFIXES = [ | |
'FUN_', # Default prefix for functions found by Ghidra | |
'f_p__', # CUSTOM_AUTO_FUNC_PREFIX | |
'f_p__TS__', # CUSTOM_AUTO_THREAD_FUNC_PREFIX | |
] | |
from pprint import pprint | |
cp = currentProgram |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// language=Handlebars | |
const RAW_CLASS_TEMPLATE = ` | |
class SettingsClass extends {{baseClassName}} { | |
namespace = {{toStringLiteral namespace}} | |
//// Private Methods //// | |
static _register() { | |
{{#each settings as | setting |}} | |
game.settings.register( | |
this.namespace, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import (absolute_import, division, print_function) | |
__metaclass__ = type | |
from ansible.plugins.action import ActionBase | |
# Load the display handler to send logging to CLI or relevant display mechanism | |
try: | |
from __main__ import display | |
except ImportError: | |
from ansible.utils.display import Display |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COMPOSE_FILES=this.yaml:that.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function setElevation(value) { | |
// Scenarios: | |
// - Tokens are selected, hovered token is undefined. | |
// - Set elevation of selected tokens. | |
// - Tokens are selected, hovered token is in selection. | |
// - Set elevation of selected tokens. | |
// - Tokens are selected, hovered token is not in selection. | |
// - Set elevation of hovered token. | |
// - No tokens are selected, hovered token is undefined. | |
// - Do nothing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// let realRawData = `...` | |
// Note: The following code uses inconsistant processing strategies for the purposes of example. | |
{ | |
//// Utility Functions //// | |
const querySelectorAll = (node, expr) => node.querySelectorAll(expr); | |
const querySelector = (node, expr) => node.querySelector(expr); | |
function* queryXPathAll(node, expr) { | |
const evaluator = new XPathEvaluator(); |
NewerOlder