Skip to content

Instantly share code, notes, and snippets.

View JamieMagee's full-sized avatar
💪

Jamie Magee JamieMagee

💪
View GitHub Profile
$directory = "E:\DCIM\100GOPRO"
$rootFiles = Get-ChildItem -Path $directory -Filter "GOPR*.MP4" | Sort-Object
$suffixes = $rootFiles | ForEach-Object { $_.BaseName.Substring($_.BaseName.Length - 4) }
$groups = $suffixes | ForEach-Object {
$suffix = $_
$group = Get-ChildItem -Path $directory -Filter "*$suffix*.MP4" | Sort-Object
[PSCustomObject]@{
Suffix = $suffix
Group = $group
# Make an HTTP call to whatsprintisit.com to get the current sprint number
# and update the package.json files in the Tasks folder to use the correct
# Get the current sprint number
$res = Invoke-RestMethod -Headers @{"Accept" = "application/json" } -Uri "https://whatsprintisit.com"
$currentSprint = $res.sprint
# Find all directories under the Tasks folder
$tasks = Get-ChildItem -Path .\Tasks -Directory -Recurse
@JamieMagee
JamieMagee / README.md
Last active March 31, 2023 00:24
New Windows Setup
[Unit]
Description=Microsoft Identity Device Broker Service
[Service]
User=microsoft-identity-broker
Group=microsoft-identity-broker
Type=dbus
BusName=com.microsoft.identity.devicebroker1
RuntimeDirectory=microsoft-identity-device-broker
@JamieMagee
JamieMagee / windows-1.cs
Created January 2, 2023 21:34
Scanning Windows container images
using Registry;
var registryHive = new RegistryHive("/tmp/nanoserver/layer/Files/Windows/System32/config/SOFTWARE");
registryHive.ParseHive();
var currentVersion = registryHive.GetKey(@"Microsoft\Windows NT\CurrentVersion");
var fullVersion =
$"{currentVersion.GetValue("CurrentMajorVersionNumber")}.{currentVersion.GetValue("CurrentMinorVersionNumber")}.{currentVersion.GetValue("CurrentBuildNumber")}.{currentVersion.GetValue("UBR")}";
Console.WriteLine(fullVersion);
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base"],
"lockFileMaintenance": {
"enabled": true,
"extends": ["schedule:daily"]
},
"nix": {
"enabled": true
}
This file has been truncated, but you can view the full file.
[
{
"name": "3fd",
"version": "2.6.3",
"port-version": 2,
"description": "C++ Framework For Fast Development",
"supports": "windows & !static & !arm64",
"dependencies": [
{
"name": "boost-lockfree",
#!/usr/bin/env bash
set -euo pipefail
tags=$(curl --silent https://mcr.microsoft.com/v2/dotnet/sdk/tags/list | jq -r '.tags[] | select(index("7.0"))')
for tag in $tags
do
echo -ne "\033[K$tag\r"
response=$(curl --write-out '%{http_code}' --silent --output /dev/null https://mcr.microsoft.com/v2/dotnet/sdk/manifests/$tag)
if [[ $response == "404" ]]; then
$ npm install @angular/animations --verbose
npm verb cli [
npm verb cli '/usr/bin/node',
npm verb cli '/usr/sbin/npm',
npm verb cli 'install',
npm verb cli '@angular/animations',
npm verb cli '--verbose'
npm verb cli ]
npm info using npm@8.5.5
npm info using node@v18.3.0
@JamieMagee
JamieMagee / MyWebhookEventProcessor.1.cs
Last active March 4, 2022 05:56
Writing GitHub bots in .NET
using Octokit.Webhooks;
using Octokit.Webhooks.Events;
using Octokit.Webhooks.Events.IssueComment;
public sealed class MyWebhookEventProcessor : WebhookEventProcessor
{
private readonly ILogger<MyWebhookEventProcessor> logger;
public MyWebhookEventProcessor(ILogger<MyWebhookEventProcessor> logger)