Skip to content

Instantly share code, notes, and snippets.

View joeperpetua's full-sized avatar
🐨

Joel Perpetua joeperpetua

🐨
View GitHub Profile
@joeperpetua
joeperpetua / synomount.sh
Created February 22, 2023 12:28
Script to mount/unmount Synology encrypted shared folders via CLI using synoshare built-in tool.
#!/usr/bin/sh
HELP='false'
while getopts ":hm:s:" flag
do
case "${flag}" in
h) HELP='true';;
m) METHOD=${OPTARG};;
s) SHARED_FOLDER=${OPTARG};;
\?) echo "Invalid option: -$OPTARG" >&2; exit 1;;
@joeperpetua
joeperpetua / vocabExportBusuu.md
Last active March 15, 2024 06:28
Export / Extract Vocabulary from Busuu

Export / Extract Vocabulary from Busuu Website

Steps:

  • Go to Review page: https://www.busuu.com/dashboard#/review
  • Mute the tab or the PC (when obtaining the audio links, they will be played out loud)
  • Open browser console (Ctrl + Shift + J)
  • Copy/Paste and Run the following code in the browser console:
const vocabList = document.querySelectorAll(".vocab-list-row");
let vocabToExport = [];
@joeperpetua
joeperpetua / asyncSleep.js
Last active May 6, 2023 13:38
Async sleep function with unit parameters for JavaScript.
const sleep = async (time, unit) => {
switch(unit){
case 'ms':
return new Promise(resolve => setTimeout(resolve, time));
break;
case 's':
return new Promise(resolve => setTimeout(resolve, time*1000));
break;
@joeperpetua
joeperpetua / tinyMCE-shortcuts.js
Last active January 19, 2022 16:28
Add custom shortcuts for TinyMCE editor.
// ==UserScript==
// @name TinyMCE Shortcuts
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Add custom shortcuts for TinyMCE editor.
// @author https://github.com/joeperpetua
// @match <URL>
// @grant none
// ==/UserScript==