Skip to content

Instantly share code, notes, and snippets.

View IzStriker's full-sized avatar

IzStriker IzStriker

View GitHub Profile
@IzStriker
IzStriker / onedrive.service
Last active February 26, 2024 18:34
Onedrive on linux
[Unit]
Description=Mount onedrive on setup
[Service]
ExecStart=/home/izstriker/rclone-setup.sh
[Install]
WantedBy=default.target
@IzStriker
IzStriker / GMAutoLoad.js
Created February 11, 2023 18:32
Have Tamper Monkey auto load changes for development only
(function () {
"use strict";
const scrape = async () => {
const data = await fetch("http://127.0.0.1:8080/index.js");
const script = await data.text();
eval(script);
};
GM_registerMenuCommand("Auto Load Example", scrape);
})();
// run local webserver using package npm: http-server
@IzStriker
IzStriker / Message.cs
Created January 21, 2023 06:23
C# Message Queue
#pragma warning disable CS8618
public class Message<T> where T : class
{
public T Payload { get; set; }
public string Channel { get; set; }
}
#pragma warning restore CS8618

Count lines of code in directory

find . -type f \( -name '*.cs' -o -name '*.ps1' \) | xargs wc -l | sort -nr

Clean up old branches

Modify array with branches you want to keep

git branch | %{ $_.Trim() } | ?{ @('main','master') -notcontains $_} | %{ git branch -D $_ }