This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// see the file beacon_heltec_lora_tx.ino below for better comments | |
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
#define HELTEC_POWER_BUTTON | |
// "Heltec ESP32 LoRa v3" by "Rop Gonggrijp" - https://github.com/ropg/Heltec_ESP32_LoRa_v3 | |
#include <heltec_unofficial.h> | |
#ifndef String | |
// include Arduino core libs if not already included |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Preferences.h> | |
#include <esp_random.h> | |
#include <mbedtls/sha256.h> | |
#ifndef String | |
#include <Arduino.h> | |
#endif | |
// set to true to clear the NVS before generating and writing a new key and IV: | |
#define CLEAR_ALL false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example for 30.7% and length = 14: ββββββββββββββ | |
// (to use this in JS, remove the `: type` annotations on line 9) | |
/** | |
* Generates an ASCII progress bar with the given percentage and max length - uses opaque characters for extra detail | |
* @param percentage A number from 0 to 100 | |
* @param barLength The length of the progress bar in characters | |
*/ | |
function generateAsciiProgressBar(percentage: number, barLength: number) { | |
const fullBlock = "β"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# - Requires the directory "o" to be created in the same directory as this script, this is where the new files will be created. | |
# You can then move them to the parent directory and overwrite the old files after you verified the files are good. | |
# - On Windows, run this with git bash or wsl | |
# Converts all ogg files in the current directory to mono 64kbps ogg files: | |
for i in *.ogg; do ffmpeg -i "$i" -c:a libvorbis -b:a 64k -ac 1 -y "o/${i%.*}.ogg"; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name window event toggler | |
// @namespace https://gist.github.com/Sv443/b2768fdebc8a037fbde4f4df9f7443a2 | |
// @match https://* | |
// @grant none | |
// @version 1.0 | |
// @author Sv443 | |
// @license WTFPL | |
// @run-at document-start | |
// @connect self |
Original source: Gist mlewand/56237c19050d27f61b807ed384dff2db
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// By Sv443 ( https://github.com/Sv443 ) - licensed under the WTFPL license | |
// | |
// !>> To use this, you need to install the package "xmlhttprequest" <<! | |
// !>> Also, set the environment variable "BOT_TOKEN" to your Discord API token <<! | |
// | |
// API reference: https://discordapp.com/developers/docs/resources/voice#list-voice-regions | |
const { XMLHttpRequest } = require("xmlhttprequest"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In order for this to work, since GitHub Package Registry likes to be a thorn in your ass, you'll have to follow this guide, otherwise this script will not work: | |
# https://pastebin.com/f24qc4Wk | |
# | |
# >>>> There are two lines that end in four exclamation marks. You will have to enter your usernames there for this script to work. | |
# | |
# Author: Sv443 | |
# License: WTFPL (http://www.wtfpl.net/txt/copying/) | |
name: Publish to NPM and GPR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// only works with Discord.js v11 or lower! | |
const Discord = require("discord.js"); | |
const dev_ids = ["YOUR_ID(s)_HERE"]; // an array of IDs of the bot's developers - only these people will be able to execute this command | |
// Note: this snippet requires the variables "client" and "message" to work, these need to be provided by your script | |
NewerOlder