Skip to content

Instantly share code, notes, and snippets.

@GithubUser5462
GithubUser5462 / main.go
Created November 25, 2023 18:20
Golang: Generate an error when a JSON field is present but the corresponding struct field is missing - Disallow Unknown Fields
package main
import (
"bytes"
"encoding/json"
"fmt"
)
type User struct {
Name string `json:"name"`
@GithubUser5462
GithubUser5462 / ReadMe.md
Last active October 10, 2024 21:11
ERROR: unable to configure virtual network port: could not open TUN/TAP device: No such file or directory

ERROR: unable to configure virtual network port: could not open TUN/TAP device: No such file or directory

The error message you are seeing is related to the TUN/TAP device. This device is used to create virtual network interfaces. The error message suggests that the device is not available or not configured correctly.

You can try the following steps to resolve the issue:

1. Kernel module

  • Check if the TUN/TAP device is loaded by running the command lsmod | grep tun
  • If it is not loaded, you can load it by running sudo modprobe tun
@GithubUser5462
GithubUser5462 / ReadMe.md
Last active October 15, 2022 23:01
Find and remove removed /hidden / unlisted / delisted game from Steam Wishlist
@GithubUser5462
GithubUser5462 / xrdp_error_in_trans_connect chan.md
Created August 13, 2022 19:53
Fix xrdp_mm_chansrv_connect: error in trans_connect chan

xrdp_mm_chansrv_connect: error in trans_connect chan

Client PC - freerdp error message:

user@client-pc ➜  ~ wlfreerdp /dynamic-resolution /disp +auto-reconnect +clipboard /timeout:5000 /bpp:16 /network:auto /v:host-pc /u:"user" /p:"password"
[19:06:32:142] [18472:18472] [WARN][com.freerdp.crypto] - Certificate verification failure 'self signed certificate (18)' at stack position 0
[19:06:32:142] [18472:18472] [WARN][com.freerdp.crypto] - C = US, ST = CA, L = Sunnyvale, O = xrdp, CN = www.xrdp.org
[19:06:33:245] [18472:18472] [INFO][com.freerdp.gdi] - Local framebuffer format  PIXEL_FORMAT_BGRA32

[19:06:33:245] [18472:18472] [INFO][com.freerdp.gdi] - Remote framebuffer format PIXEL_FORMAT_BGRA32

@GithubUser5462
GithubUser5462 / waydroid_cleanup.sh
Created July 22, 2022 17:06
Waydroid cleanup after uninstall - remove leftover app shortcuts from launcher
#!/bin/bash
# https://docs.waydro.id/usage/install-on-desktops#reinstalling-waydroid
# chmod a+x waydroid_cleanup.sh; sudo waydroid_cleanup.sh;
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi