Skip to content

Instantly share code, notes, and snippets.

View Ruffo324's full-sized avatar
💭
I computer. (This is now a verb.) Generally this means programming. 🐯

Groot Ruffo324

💭
I computer. (This is now a verb.) Generally this means programming. 🐯
View GitHub Profile
@dotMorten
dotMorten / MSBuildCheatSheet.xml
Created January 14, 2019 23:19
MSBuild Cheat Sheet
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
How to define a variable.
Just stick a new node in a property group.
-->
<PropertyGroup>
<!-- This node in a property group will define a variable -->
<TestVariable>Test Variable Value</TestVariable>
@Ruffo324
Ruffo324 / main.py
Created August 7, 2019 23:07
JPEG to PNG with color replacement
from PIL import Image
import os
print("JPEG to PNG converter with Color replacement started.")
sourceDirectory = ".\source_images"
targetDirectory = ".\converted_images"
minColorValue = 235
maxColorValue = 255
@Ruffo324
Ruffo324 / GitLab_total_line_changes_merge_request.js
Last active July 24, 2020 15:19
Views the total added lines in the gitlab merge-review page.
// Open the Merge-Review, navigate to the "Changes (x)" tab, and paste the following code into the developer console.
var totalRemoved = 0;
var totalAdded = 0;
for(var i = 0; i < $(".file-row-stats > .cgreen").length; i++)
{
totalAdded += parseInt($(".file-row-stats > .cgreen")[i].innerText);
totalRemoved += parseInt($(".file-row-stats > .cred")[i].innerText);
}
console.log(`Added: \t\t${totalAdded}\nRemoved: \t${totalRemoved}\nTotal: \t\t${totalAdded + totalRemoved}`);
@Ruffo324
Ruffo324 / FilterIFFTSkipOnDay.ts
Created February 1, 2021 20:05
IFFT Filter - Only run applet if its dark outside
/**
* IFFT Filter script, to execute an applet only if it's dark outside. Works position based.
* Just change the lat long below to your wanted location.
*/
const pos = {lat: 52.XYZ, long: 7.XYZ};
// Just placeholder for codecompletion!
// let Meta:any;
// let MakerWebhooks:any;
@Ruffo324
Ruffo324 / Hyper-V PCI-Passthroug.ps1
Last active May 2, 2024 16:56
Hyper-V PCIe passthrough CheatSheet
# Change to name of TARGET-VM.
$vm='CHANGE_ME'
# Change to PCI device location (💡 Location).
$Location = 'CHANGE_ME'
# Enable CPU features.
Set-VM -GuestControlledCacheTypes $true -VMName $vm
# Host-Shutdown rule must be changed for the VM.
Set-VM -Name $vm -AutomaticStopAction TurnOff