Skip to content

Instantly share code, notes, and snippets.

View mbtools's full-sized avatar
📦
Busy building apm 😀

Marc Bernard mbtools

📦
Busy building apm 😀
View GitHub Profile
@njames
njames / remove-ms-stuff.ps1
Last active January 23, 2026 11:22
How to get rid of all the MS stuff on a fresh install of windows
# This powershell script will remove all the in your face content on Edge and the widgets
# that are annoying
# use at your own risk
# Disable Edge new tab content and quick links
$edgePolicy = "HKLM:\SOFTWARE\Policies\Microsoft\Edge"
New-Item -Path $edgePolicy -Force | Out-Null
Set-ItemProperty -Path $edgePolicy -Name "NewTabPageContentEnabled" -Type DWord -Value 0
Set-ItemProperty -Path $edgePolicy -Name "NewTabPageQuickLinksEnabled" -Type DWord -Value 0
@brittanyellich
brittanyellich / BlueskyComments.tsx
Created August 5, 2025 21:49
Showing Likes and Comments on Bluesky
import React from "react";
export type CommentPost = {
post: {
author: {
did: string;
handle: string;
displayName: string;
avatar: string;
};
<?php
/**
* Plugin Name: Disable Textdomain Error
* Description: Prevents triggering errors for the '_load_textdomain_just_in_time' function.
* Author: Kowsar Hossain
* Version: 1.0
*
* Note: This is a Must-Use (MU) plugin. Place this file in the 'wp-content/mu-plugins' directory.
*/
@theaog
theaog / update-golang.sh
Last active August 12, 2025 07:43
update-golang.sh
#!/usr/bin/env bash
set -e
tmp=$(mktemp -d)
pushd "$tmp" || exit 1
function cleanup {
popd || exit 1
rm -rf "$tmp"
}
@g-back
g-back / zcl_im_cts_request_check.abap
Created November 16, 2021 15:43
Example, CTS BAdI: Check if objects are included in abapGit repos
CLASS zcl_im_cts_request_check DEFINITION
PUBLIC
FINAL
CREATE PUBLIC.
PUBLIC SECTION.
INTERFACES if_ex_cts_request_check.
PROTECTED SECTION.
PRIVATE SECTION.
@nandorojo
nandorojo / private-npm-in-gh-actions.md
Created August 3, 2021 23:52
Use private NPM packages in your GitHub actions

1 NPM_TOKEN

Add an NPM_TOKEN secret on GitHub. Get your secret key from the NPM dashboard.

2 Add a step to your action

- name: Authenticate with private NPM package
  run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
@jongio
jongio / PhotoOrganizer.ps1
Created March 3, 2021 15:34
A PowerShell script to organize photos by date taken
Param(
[string]$source,
[string]$dest,
[string]$format = "yyyy/yyyy_MM/yyyy_MM_dd"
)
$shell = New-Object -ComObject Shell.Application
function Get-File-Date {
[CmdletBinding()]
@sindresorhus
sindresorhus / esm-package.md
Last active January 21, 2026 15:40
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@larryclaman
larryclaman / convert-to-spot.ps1
Created April 8, 2020 19:23
Convert an Azure VM to a Spot VM type
<# Convert a VM to a Spot VM
Based on sample script at https://docs.microsoft.com/en-us/azure/virtual-machines/windows/change-availability-set
NOTE: Extensions will not be copied to new instance!!
#>
# Set variables to your specifics
$resourceGroup = "myRG"
$vmName = "myVM"
# Get the details of the VM to be moved to the Availability Set