Skip to content

Instantly share code, notes, and snippets.

View dend's full-sized avatar
🚧
Building Things

Den Delimarsky dend

🚧
Building Things
View GitHub Profile
@dend
dend / halo-5-ranks.json
Created November 26, 2025 21:29
A complete manifest of Halo 5 Spartan Ranks.
{
"Paging": {
"StartAt": 0,
"InlineCount": 2,
"TotalCount": 2
},
"ContentItems": [
{
"Id": 114729,
"Type": "SpartanRankManifest",
@dend
dend / halo-5-ranks.ps1
Last active November 26, 2025 21:24
Get the list of Halo 5 ranks and render them in a table.
$uri = "https://content-hacs.svc.halowaypoint.com/contents/SpartanRankManifest"
try {
$response = Invoke-RestMethod -Uri $uri -Method Get
$results = foreach ($contentItem in $response. ContentItems) {
$spartanRanks = $contentItem. View.SpartanRankManifest.SpartanRanks
if ($spartanRanks -and $spartanRanks. Count -gt 0) {
foreach ($rank in $spartanRanks) {
@dend
dend / halobuff.ps1
Created July 26, 2022 06:49
Script to enable all Halo Infinite content (maps and game modes) for your account
# Script by Den Delimarsky - Written in July 2022
# Enables all modes and maps that are available in a given build manifest.
# For details, refer to https://den.dev/blog/halo-infinite-enable-all-content
param (
# Spartan V4 token, used for authentication against the Halo Infinite API.
[Parameter(Mandatory=$true)]
[string]$SpartanV4Token,
# Build ID accessible to the user which is authenticating.
@dend
dend / cross-reference-full.gql
Last active August 25, 2024 17:19
Find cross-referenced issues
{
repository(owner: "microsoft", name: "powertoys") {
issues(first: 100, states: OPEN) {
totalCount
pageInfo {
startCursor
hasNextPage
endCursor
}
edges {
var list = document.getElementsByTagName("rect")
var color_strings = ['var(--color-calendar-graph-day-L4-bg)', 'var(--color-calendar-graph-day-L3-bg)', 'var(--color-calendar-graph-day-L2-bg)', 'var(--color-calendar-graph-day-L1-bg)']
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
function getRandomInt(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
@dend
dend / toast.ps1
Last active May 21, 2025 09:34
Toast Notification in PowerShell
function Show-Notification {
[cmdletbinding()]
Param (
[string]
$ToastTitle,
[string]
[parameter(ValueFromPipeline)]
$ToastText
)
@dend
dend / submit.js
Created October 21, 2018 05:55
Submit image to Face API
var dataURItoBuffer = function (dataURL, callback) {
var buff = new Buffer(dataURL.replace(/^data:image\/(png|gif|jpeg);base64,/, ''), 'base64');
callback(buff);
};
var sendImageToMicrosoftDetectEndPoint = function (imageData, callback) {
console.log('Entered helper');
dataURItoBuffer(imageData, function (buff) {
request.post({
url: keyConfig.microsoftDetectURL,
migration_count = str(len(ideas_to_migrate))
print ("Number of suggestions to migrate: " + migration_count)
target_repo = g.get_repo(GITHUB_TARGET_REPO)
counter = 0
print ('Kicking off migration to GitHub...')
for idea in ideas_to_migrate:
counter += 1
print ('Migrating idea ' + str(counter) + ' of ' + migration_count + "...")
f = ProfanitiesFilter([''], replacements="*")
f.inside_words = True
# UserVoice account ID. This is part of the URL, e.g. for msdocs.uservoice.com, this would be msdocs.
USERVOICE_ACCOUNT_ID = ''
USERVOICE_API_KEY = ''
USERVOICE_API_SECRET = ''
USERVOICE_SSO_KEY = ''
USERVOICE_CALLBACK_URL = 'http://docs.microsoft.com/'
GITHUB_TARGET_REPO = 'MicrosoftDocs/feedback'
GITHUB_PERSONAL_ACCESS_TOKEN = ''