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 / 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 October 8, 2022 09:29
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 April 2, 2024 14:50
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 = ''
// This code example demonstrates the Console.WriteLine() method.
// Formatting for this example uses the "en-US" culture.
using System;
class Sample
{
enum Color {Yellow = 1, Blue, Green};
static DateTime thisDate = DateTime.Now;
public static void Main()
public class Program
{
static void Main(string[] args)
{
Task.Run(async () => { await ExecuteRunner(); }).GetAwaiter().GetResult();
}
public static async Task<bool> ExecuteRunner()
{
for (int i = 0; i < 583; i++)