Skip to content

Instantly share code, notes, and snippets.

View hizkifw's full-sized avatar
🍝

Hizkia Felix hizkifw

🍝
View GitHub Profile
@hizkifw
hizkifw / midi_piano.pde
Created June 10, 2020 18:24
Draw an 88-key piano that responds to UDP messages
import hypermedia.net.*;
int PORT_RX = 5000;
String HOST_IP = "127.0.0.1"; //IP Address of the PC in which this App is running
UDP udp; //Create UDP object for recieving
final int K_WIDTH = 22;
final int K_HEIGHT = 127;
final int K_B_WIDTH = 11;
final int K_B_HEIGHT = 80;
#!/bin/bash
su -s /bin/bash -c 'plexdrive mount --drive-id=... /mnt/somewhere' $USER
@hizkifw
hizkifw / cloudflare-worker-youtube-dl.js
Last active February 22, 2025 10:21
Download YouTube videos with Cloudflare Worker
/**
* cloudflare-worker-youtube-dl.js
* Get direct links to YouTube videos using Cloudflare Workers.
*
* Usage:
* GET /?v=dQw4w9WgXcQ
* -> Returns a JSON list of supported formats
*
* GET /?v=dQw4w9WgXcQ&f=251
* -> Returns a stream of the specified format ID

SIM GE Calendar Import to Google Calendar

SIM provides an iCal calendar for external apps, but the URL they provided has a broken timezone setting that doesn't work with Google Calendar. This guide will help you import your SIM calendar to Google Calendar.

Get your calendar ID

Go to SIMConnect > My Apps > Mobile Calendar > Calendar Configuration

Where to get calendar ID

@hizkifw
hizkifw / drives.txt
Last active December 3, 2020 11:42
Scrape onedrive files list from futanaicha's hololive backups
https://futanaicha-my.sharepoint.com/:f:/g/personal/vps_futanaicha_onmicrosoft_com/EkPrZwM3j8ROmloaVjxII34BxJjb-02hKkupxSXdkh89DA
https://futanaicha-my.sharepoint.com/:f:/g/personal/vps-2_futanaicha_onmicrosoft_com/Es7aUNACQNZBmB-72Ed_vj8B-DLF__cILghp42MaEcN3EA
https://futanaicha-my.sharepoint.com/:f:/g/personal/vps-3_futanaicha_onmicrosoft_com/En5Rjv9ltolKh9S4c4q1m9oBrf55nRtnYGrPwe8Ijd8QDQ
https://futanaicha-my.sharepoint.com/:f:/g/personal/vps-4_futanaicha_onmicrosoft_com/EnK63rbgp95BsFt0ck4f0RkBXO2y7D6-33b-g3QIZ-tTYg
https://futanaicha-my.sharepoint.com/:f:/g/personal/vps-5_futanaicha_onmicrosoft_com/EqQjhXB0ktZKvbbOEb92tdkB7Onq-tHf-KYiDBDHXg1ExA
https://futanaicha-my.sharepoint.com/:f:/g/personal/vps-6_futanaicha_onmicrosoft_com/EpY4-1fCJFBOufihq1UPdA8BWix-FGferggB16Zac_LUzw
https://futanaicha-my.sharepoint.com/:f:/g/personal/vps-7_futanaicha_onmicrosoft_com/EiGYDlaesWVKgAnTjRUuNe0BnhA6IrEn_xRkhvygVWCiiQ
https://futanaicha-my.sharepoint.com/:f:/g/personal/vps-8_futanaicha_onmicrosoft_com/EiBTp6c_XQBOgIDdb
@hizkifw
hizkifw / huion.sh
Created March 18, 2021 14:52
Script to configure my Huion 430P tablet area
#!/bin/sh
# https://askubuntu.com/questions/801761/huion-tablet-drawing-area
# Here's how the Coordinate Transformation Matrix works
# https://wiki.ubuntu.com/X/InputCoordinateTransformation
# Here's a matrix multiplication calculator
# https://math.tools/calculator/matrix/multiplication/
if [ "$1" = "osu" ]; then
@hizkifw
hizkifw / ScanFolder.gs
Created March 24, 2021 18:08
Recursively iterate over Google Drive files and folders in Google Apps Script with continuation support
function scanFolder(folder, stopTime, callback) {
let ct = null;
const properties = PropertiesService.getScriptProperties();
// Iterate files
ct = properties.getProperty('iter:' + folder.getId() + ':files')
let files = folder.getFiles();
if(ct) files = DriveApp.continueFileIterator(ct);
while(files.hasNext()) {
const file = files.next();
@hizkifw
hizkifw / natroute.sh
Created March 30, 2021 19:17
iptables nat port forwarding
#!/bin/bash
NETWORK_INTERFACE=virbr1
if [ $# = 4 ]; then
ONOFF=$1
HOST_PORT=$2
GUEST_IP=$3
GUEST_PORT=$4
else
@hizkifw
hizkifw / ragtag-link.js
Created March 31, 2021 11:02
URL Shortener using Cloudflare Workers https://ragtag.link
// test.context.js
import React from 'react';
const TestContext = React.createContext({
myName: '',
setMyName: () => null
});
export default TestContext;
// test.provider.js