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
@Ruffo324
Ruffo324 / BarModule.ino
Last active July 23, 2019 05:21
Castellans Bar Module source with bug
//-------------------------------------------------------------------------------
// Used for: Castellans Irish-Folk Open Air Festival
// Module: Bar(Sender) module
// Author: Christian Groothoff
// Last edit: 07/10/2019
// Working compatible keyword: StressedOut-TwentyOnePilots
//-------------------------------------------------------------------------------
// Working compatible keyword:
// -> "Keyword" wich indicates compatible Sender and Receiver scripts.
// Must be same on each script, to ensure compatibilitya.
@Ruffo324
Ruffo324 / .editorconfig
Last active April 2, 2021 01:16
Random C# Xamarin .editorconfig file
##########################################################
# EditorConfig is awesome: https://EditorConfig.org #
# Configuration for C# Xamarin application development.#
##########################################################
# "Master" setting, which can only be overwritten by other "root = true" child configurations for ther child elements.
root = true
###############################
# Core EditorConfig Options #
@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 / pixelBusHelper.cpp
Created August 5, 2020 20:59
Do stuff for multiple pixelBus stripes.
#include <Arduino.h>
#include <NeoPixelBus.h>
#include <NeoPixelAnimator.h>
const int amountLeds = 20;
// ggf. hier den generischen teil(<..,..>) von NeoPixelBus an deine stripes anpassen.
typedef NeoPixelBus<NeoRbgFeature, NeoEsp32BitBang800KbpsMethod> stripeDef;
stripeDef stripe1(amountLeds, 21);
stripeDef stripe2(amountLeds, 23);
// navigate to: https://highlightjs.org/static/demo/
// open developer console
// paste the following and press enter
console.log( $(".all>h2").get().map(x => x.innerText.replace(/\s/g, "")).join("\n"));
using System;
using System.Linq;
namespace ConsoleApp1
{
/// <summary>
/// Target:
/// 1) Read in Number of students
/// 2) Create array with number of elements for age (int) & weight (double)
/// 3) Reading of age & weight
@Ruffo324
Ruffo324 / AfLooper.cs
Last active October 30, 2020 23:05
AfLooper - Simple 'afplay' wrapper with looping function for .NET Core
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
public class AfLooper
{
// Value between 0 - 100.
public decimal Volume
{
@Ruffo324
Ruffo324 / get-my-namecheap-domains.js
Last active January 9, 2021 22:46
List all namecheap domains as text
// Paste the following JS line into the Browser-Development-Tools Console. under https://ap.www.namecheap.com/domains/list/
console.log([...document.querySelectorAll("div.gb-domain-name>label>span")].map(x => x.innerText).join('\n'))
@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;