Skip to content

Instantly share code, notes, and snippets.

View Nolanrulesroblox's full-sized avatar

Nolan Nolanrulesroblox

View GitHub Profile
@Nolanrulesroblox
Nolanrulesroblox / app.py
Last active November 3, 2025 19:48
QR code visualization
import cv2
import numpy as np
from itertools import cycle
import matplotlib.pyplot as plt
import os
import qrcode
MASK_FUNCS = [
lambda r, c: (r + c) % 2 == 0,
lambda r, c: r % 2 == 0,
window.FIREDACONFETTIEEEEEEEE();
document.querySelectorAll('.ant-form-item-control').forEach((container) => {
const radios = container.querySelectorAll("[type='radio']");
if (radios.length > 0) {
radios[radios.length - 1].click(); // Click the last radio button in each container
}
});
document.querySelector(".mainContainer").scrollTo({
function isExpiringInSixMonths(expiryDateStr) {
const expiryDate = new Date(expiryDateStr);
const currentDate = new Date();
const sixMonthsFromNow = new Date();
sixMonthsFromNow.setMonth(currentDate.getMonth() + 6);
console.log("isExpiringInSixMonths")
console.log(expiryDate <= sixMonthsFromNow && expiryDate >= currentDate)
return expiryDate <= sixMonthsFromNow && expiryDate >= currentDate;
}
CREATE USER 'replication_user'@'%' IDENTIFIED BY 'password';
GRANT REPLICATION SLAVE ON *.* TO 'replication_user'@'%';
ALTER USER 'replication_user'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
^^^ add to master
CHANGE MASTER TO
MASTER_HOST='192.168.x.x', --your ip here
MASTER_USER='replication_user', -- your user here
MASTER_PASSWORD='password', -- your password etc
MASTER_AUTO_POSITION=1;
from PIL import Image
import os
# Set the input directory
input_dir = input("path/to/directory")
# Set the output directory
output_dir = input("path/to/output/directory")
for root, dirs, files in os.walk(input_dir):
document.body.insertAdjacentHTML('beforeend','<div id="slider" style="position: fixed; width: 10px; background-color: transparent; height: 100vh; top: 0px; left: 0px; display: block; color: transparent;">e</div> <div id="slider2" style="position: fixed; background-color: black; height: 100vh; top: 0px; left: 0px; transition: all 0.1s ease 0s; width: 0px; display: flex; justify-content: center; align-items: center; overflow: hidden; color: wheat;">THIS IS A COOL SLIDING THINGY</div>')
dragElement(document.querySelector('#slider'))
document.querySelector('#slider2').innerHTML = location.protocol + '//' + location.host + location.pathname
function dragElement(elmnt) {
var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
elmnt.onmousedown = dragMouseDown;
elmnt.onpointerdown = dragMouseDown;
function dragMouseDown(e) {
e = e || window.event;

To enable remote fan control: ipmitool -I lanplus -H 192.168.1.240 -U root -P calvin raw 0x30 0x30 0x01 0x00

To set the fan to 20%: ipmitool -I lanplus -H 192.168.1.240 -U root -P calvin raw 0x30 0x30 0x02 0xff 0x14

To set the fan to 25%: ipmitool -I lanplus -H 192.168.1.240 -U root -P calvin raw 0x30 0x30 0x02 0xff 0x19

To set the fan to 30%: ipmitool -I lanplus -H 192.168.1.240 -U root -P calvin raw 0x30 0x30 0x02 0xff 0x1e

To set the fan to 35%: ipmitool -I lanplus -H 192.168.1.240 -U root -P calvin raw 0x30 0x30 0x02 0xff 0x23

<!DOCTYPE html>
<html>
<title>W3.CSS Template</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway">
<style>
body,h1 {font-family: "Raleway", sans-serif}
body, html {height: 100%}
<?php $path=$_SERVER['DOCUMENT_ROOT']; $path .="/link/to/file.php"; include_once($path); ?>