Skip to content

Instantly share code, notes, and snippets.

View eastoncrafter's full-sized avatar

eastoncrafter

View GitHub Profile
@tonY1883
tonY1883 / ValidateYoutubeVideoId.js
Created September 14, 2017 02:18
A small trick to check if youtube video exist with its id.
function validVideoId(id) {
var img = new Image();
img.src = "http://img.youtube.com/vi/" + id + "/mqdefault.jpg";
img.onload = function () {
checkThumbnail(this.width);
}
}
function checkThumbnail(width) {
//HACK a mq thumbnail has width of 320.
@djsime1
djsime1 / Preamble.md
Created August 7, 2022 23:07
Flipper Zero developer Q&A: Aug 6 2022

Flipper Zero developer Q&A

August 6th 2022

Below are my notes regarding every question asked and answered, covering both sessions.
While the 1st session's audio is lost to time, I have a full recording of the second session.
Stream and download the MP3 here: https://nc.dj.je/s/9FZAqbs9LwcSnio (I'm looking for a better way to host the file, perhaps I might upload the next one to archive.org)

NOTE: The transcription of questions and answeres may contain errors, take it all with a grain of salt.

@fizzxed
fizzxed / update_qbit_port.sh
Created September 15, 2023 08:15
Determine protonvpn port via gluetun and update qbittorrent
#!/usr/bin/env bash
# Determine protonvpn port via gluetun and update qbittorrent
#
# Add the following to sudo crontab -e to run every 5 minutes
# */5 * * * * /bin/sh /path/to/update_qbit_port.sh
# For synology users, run the script as root via the task scheduler every 5 minutes.
QBITTORRENT_USER= # qbittorrent username
QBITTORRENT_PASS= # qbittorrent password
QBITTORRENT_PORT=8080