Skip to content

Instantly share code, notes, and snippets.

View valorad's full-sized avatar
🤕
è

Valorad the Oneiroseeker valorad

🤕
è
  • SCET
  • Dhirim
  • 11:42 (UTC -04:00)
View GitHub Profile
@valorad
valorad / linkOn.ps1
Created October 31, 2020 00:37
Link Windows user directory folders to somewhere else
Write-Host "==============================================================="
Write-Host "=========================== Link On ==========================="
Write-Host "==============================================================="
# Configs -->
$linkConfig = [ordered]@{
"originFolder1" = "D:\test\targetFolder1"
"originFolder2" = "D:\test\targetFolder2"
}
@valorad
valorad / fishReadProfile.md
Last active November 13, 2020 23:25
Help fish user desktop find those installed flatpak/snapd apps

Help fish user desktop find those installed flatpak/snapd apps

Fish (friendly interactive shell) users find themselves losing their installed snapd/flatpak apps after restarting the desktop.

These apps can be run with respective commands. However, they are unable to be found at the desktop menu. They cannot associate default apps either.

What's happening?

If you are also a fish user, when you run flatpak update, you get this:

@valorad
valorad / arch-KDE-install-rdp.md
Last active June 5, 2022 13:18
Arch Linux KDE set up Remote Desktop (RDP)
@valorad
valorad / sysVolumeCheckIn.sh
Last active March 27, 2021 13:31
Mount BTRFS volumes and make a read-only system volume BTRFS snapshot on backup volume
#!/bin/sh
set -e
# Snapshot @targetSubvolume to @storageSubvolume/path/to/checkpoints/folder
UUID='76186cef-780f-4a80-9c0f-19fcc3a53ee6'
targetSubvolumeName='@arch-root'
storageSubvolumeName='@workspace'
mountPath="/mnt/$UUID"
@valorad
valorad / redirectStatics.yaml
Created May 14, 2021 03:49
traefik docker redirect statics example
---
version: "3.9"
services:
node:
labels:
- "traefik.enable=true"
# Vue Dev Server
@valorad
valorad / Export-UntrustedGuardian.ps1
Last active February 28, 2024 03:15
Hyper-V TPM Migration (To solve error: "The key protector could not be unwrapped" that causes VM startup failure)
$GuardianName = 'UntrustedGuardian'
$CertificatePassword = Read-Host -Prompt 'Please enter a password to secure the certificate files' -AsSecureString
$guardian = Get-HgsGuardian -Name $GuardianName
if (-not $guardian)
{
throw "Guardian '$GuardianName' could not be found on the local system."
}
@valorad
valorad / woniuFRAutoExpandMore.js
Last active January 17, 2023 14:06
Woniu FR Auto load more. No need to scroll down and click that freaking button each time want to load more.
// update 20230117
// works on https://www.woniufr.vip/p/t_pc/course_pc_detail/video/xxx
// Important: Switch to "目录" tab before executing the following code.
const clickElementAndWait = (element, timeMS = 2000) => {
return new Promise((resolve, reject) => {
element.dispatchEvent(new MouseEvent('click'));
setTimeout(() => {
resolve();
}, timeMS);
@valorad
valorad / refreshCerts.sh
Last active November 26, 2021 20:42
Regenerate certificates created by my cfssl docker container. Works under caConfig folder.
#!/bin/bash
set -e
caConfigFolder="/path/to/cfssl/caConfig"
sitesToRefresh=("com.mycompany" "site.my")
serverCertFolder="./certs"
for site in ${sitesToRefresh[@]}; do
@valorad
valorad / fedora-LXQT-install-xrdp.md
Last active June 5, 2022 13:19
Fedora LXQT set up Remote Desktop (xrdp)
@valorad
valorad / fishOnFedoraLXQT.md
Created December 30, 2021 16:14
Using fish shell on Fedora LXQT Desktop

Using fish shell on Fedora LXQT Desktop

  1. Install fish
sudo dnf install fish
  1. Change default shell to fish