Skip to content

Instantly share code, notes, and snippets.

@oczki
oczki / circles.pde
Created December 16, 2021 17:08 — forked from anonymous/circles.pde
circles
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
@oczki
oczki / php-context-menu.md
Last active March 10, 2021 07:11
How to: Add a shortcut to .php files to run PHP server at their location

How to add a context menu shortcut to .php files, so that a PHP server is run there. Tested on Windows 10.

1. Download PHP

Versions 5.4+ have a built-in web server.

Download PHP from windows.php.net.

2. Write a batch script

@oczki
oczki / control-mouse-via-keyboard.ahk
Created January 5, 2021 19:17
AutoHotkey: Control mouse pointer via keyboard + left/right click + scroll
#KeyHistory 0
#NoTrayIcon
#SingleInstance force
#Persistent
SetStoreCapslockMode, off
; Moves the mouse pointer, with a smaller jump if Shift is held.
MouseControl(deltaX, deltaY, regularJump := 60, smallJump := 8) {
multiplier := regularJump
if GetKeyState("Shift", "P")
@oczki
oczki / prevent-shifting-on-overflow.css
Created August 16, 2020 14:24
CSS - Prevent that tiny horizontal shift of a webpage's centered body when its scrollbar appears.
/* If body is centered, this will prevent the contents from shifting if a scrollbar appears. */
@media screen and (min-width: 60em) {
html {
margin-left: calc(100vw - 100%);
}
}
@oczki
oczki / netflix-parenthesis-text-removal.js
Last active June 7, 2020 11:33 — forked from BernieCr/netflix-hi-subs-removal.js
Netflix - remove hearing impaired captions from subtitles
(function() {
var targetNode = document.querySelector('.player-timedtext');
function callback(mutationsList) {
const e = document.querySelectorAll('.player-timedtext-text-container > *');
if (e) {
e.forEach(sub => {
const before = sub.innerHTML;
let after = before