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;
@tjunxiang92
tjunxiang92 / AndroidManifest.xml
Last active April 22, 2024 19:14
Flutter: Receiving Shared Data from other Apps
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Add This intent-filter -->
<intent-filter>
<action android:name="android.intent.action.SEND" />
@xthezealot
xthezealot / README.md
Last active August 3, 2023 14:07
Normalize unicode file names (converts UTF-8 NFD to NFC). Required by macOS clients through AFP/NFS/SMB. Tested on Synology DSM 6.2 with built-in Python 2.7.12.

NFCFN.py

Normalize unicode file names (converts UTF-8 NFD to NFC).
Required by macOS clients through AFP/NFS/SMB.

Tested on Synology DSM 6.2 with built-in Python 2.7.12.

Usage

@Changaco
Changaco / btrfs-undelete
Last active April 22, 2024 20:06
btrfs-undelete
#!/bin/bash
# btrfs-undelete
# Copyright (C) 2013 Jörg Walter <info@syntax-k.de>
# This program is free software; you can redistribute it and/or modify it under
# the term of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or any later version.
if [ ! -b "$1" -o -z "$2" -o -z "$3" ]; then
echo "Usage: $0 <dev> <file/dir> <dest>" 1>&2
echo