Skip to content

Instantly share code, notes, and snippets.

@paulkaplan
paulkaplan / colorTempToRGB.js
Last active March 4, 2024 10:29
Color Temperature to RGB
// From http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/
// Start with a temperature, in Kelvin, somewhere between 1000 and 40000. (Other values may work,
// but I can't make any promises about the quality of the algorithm's estimates above 40000 K.)
function colorTemperatureToRGB(kelvin){
var temp = kelvin / 100;
@byjg
byjg / NoVNC_Paste.js
Last active June 30, 2024 17:10
How to Paste code to NoVNC.
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
window.sendString = function (str) {
f(str.split(""));
function f(t) {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = character.match(/[A-Z!@#$%^&*()_+{}:\"<>?~|]/);
@Sg4Dylan
Sg4Dylan / qb-ban-vampire.py
Last active August 2, 2024 09:51
qBittorrent block vampire peers. qBittorrent 屏蔽吸血客户端.
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Author: Sg4Dylan -- <sg4dylan#gmail.com>
# Licence: GPLv3
import requests
import re
import json
import time
@BreadFish64
BreadFish64 / fsr_easu_expanded.comp
Created July 16, 2021 22:36
AMD FSR mpv shaders
//!DESC FSR_EASU
//!HOOK MAINPRESUB
//!BIND HOOKED
//!WIDTH OUTPUT.w
//!HEIGHT OUTPUT.h
//!COMPUTE 8 8
#extension GL_GOOGLE_include_directive : enable
#define SAMPLE_EASU 1