Skip to content

Instantly share code, notes, and snippets.

View tienthanh2509's full-sized avatar

Phạm Tiến Thành tienthanh2509

View GitHub Profile
@tienthanh2509
tienthanh2509 / gist:37590cc36dbb9d4bde750e9ff24d16c5
Created January 28, 2025 01:55
Android screen capture whitelist
cmd appops set com.microsoft.appmanager PROJECT_MEDIA allow
cmd appops set com.carriez.flutter_hbb PROJECT_MEDIA allow
0.0.0.0 adtago.s3.amazonaws.com
0.0.0.0 analyticsengine.s3.amazonaws.com
0.0.0.0 analytics.s3.amazonaws.com
0.0.0.0 advice-ads.s3.amazonaws.com
0.0.0.0 stats.g.doubleclick.net
0.0.0.0 ad.doubleclick.net
0.0.0.0 static.doubleclick.net
0.0.0.0 m.doubleclick.net
0.0.0.0 mediavisor.doubleclick.net
0.0.0.0 static.media.net
@tienthanh2509
tienthanh2509 / no-nag-script.sh
Created December 24, 2023 06:40
Proxmox remove subscription message
echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" >/etc/apt/apt.conf.d/no-nag-script
apt reinstall proxmox-widget-toolkit
@tienthanh2509
tienthanh2509 / 01electron.sh
Created August 24, 2023 04:28
Skype / Electron app set custom proxy
#!/bin/bash
# open skype and enable remote inspect
skypeforlinux --inspect http://127.0.0.1:9229
@tienthanh2509
tienthanh2509 / run.sh
Created August 12, 2023 16:22
Termux SSHD for root user
export PATH=/data/data/com.termux/files/usr/bin:$PATH
sshd \
-D -dd \
-p 2222 -e
@tienthanh2509
tienthanh2509 / README.md
Last active July 13, 2022 07:25
Pfsense headless (without VGA and Serial console)

Note

Disable serial hint if needed

Comment out uart hints in file /boot/device.hints

#hint.uart.0.at="isa"
#hint.uart.0.port="0x3F8"
#hint.uart.0.flags="0x10"
@tienthanh2509
tienthanh2509 / README.md
Created April 8, 2022 07:16
Kubectl config switcher

You are tried many kubeconfig files kc command will help it easy to switch multiple kubeconfig file for you

How does it work? The script will scan your config file in ~/.kube/*.yaml and provide a bash shell autocompletion

Provide kc command switch kube config in ~/.kube/*.yaml
Usage: kc <file> | kc <press tab tab>
/**
* This GraphiQL example illustrates how to use some of GraphiQL's props
* in order to enable reading and updating the URL parameters, making
* link sharing of queries a little bit easier.
*
* This is only one example of this kind of feature, GraphiQL exposes
* various React params to enable interesting integrations.
*/
@tienthanh2509
tienthanh2509 / guest_network.sh
Last active October 29, 2024 07:50
Isolated guest network setup for Padavan firmware
# DHCP Setting
# LAN > DHCP Server > Custom Configuration File "dnsmasq.conf"
interface=br-guest
listen-address=192.168.3.1
dhcp-range=set:guest,192.168.3.100,192.168.3.200,255.255.255.0,1h
# Router address
dhcp-option=tag:guest,3,192.168.3.1
# DNS V4
dhcp-option=tag:guest,6,8.8.8.8,8.8.4.4
# Domain
@tienthanh2509
tienthanh2509 / auto_logon.sh
Created July 20, 2021 02:55
Ubuntu console auto login
mkdir -p /etc/systemd/system/[email protected]
# replace username to user need to auto login
# don't support decrypt
cat << EOF > /etc/systemd/system/[email protected]/override.conf
[Service]
ExecStart=
ExecStart=-/sbin/agetty --noissue --autologin username %I $TERM
Type=idle
EOF