Skip to content

Instantly share code, notes, and snippets.

@qzydustin
qzydustin / pandora-share-token-update.py
Last active September 1, 2023 05:19
Update pandora share token
import requests
openai_account = ''
openai_password = ''
unique_names = ['admin','xxx']
token_url = 'https://ai.fakeopen.com/auth/login'
share_token_url = 'https://ai.fakeopen.com/token/register'
headers = {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
@qzydustin
qzydustin / github-backup.sh
Last active September 1, 2023 05:10
Backup GitHub
#!/bin/bash
# Set the value of USER_NAME variable to your username
export USERNAME="Your username"
# Set the value of ACCESS_TOKEN variable to your access token
export ACCESS_TOKEN="Your access token"
# Get the script directory
@qzydustin
qzydustin / firewall-reset.sh
Last active September 1, 2023 05:10
Reset Firewall Rules
#!/bin/bash
# This script resets the firewall rules, installs iptables-persistent, and saves the rules to files.
# Set the default policies to accept all traffic
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
# Flush all existing rules and chains
@qzydustin
qzydustin / linux-optimize.sh
Last active September 1, 2023 05:11
Optimize Linux Network Performance
#!/bin/sh
# Set kernel parameters in /etc/sysctl.conf
cat << EOF > /etc/sysctl.conf
# Increase maximum number of open file descriptors
fs.file-max = 1000000
# Increase maximum number of inotify instances per user
fs.inotify.max_user_instances = 8192
@qzydustin
qzydustin / macOS-input-method-killer.sh
Last active October 22, 2023 14:29
Resolving macOS Chinese Input Lag Issue
#!/bin/sh
# This script aims to address the problem of input lag that can occur when using the Chinese input method on macOS.
# It provides a simple and effective solution by terminating the SCIM process, which is often the cause of the lag.
# To use the script, follow these steps:
# 1. Open the Terminal application (located in "Applications/Utilities/Terminal").
# 2. Copy and paste the script into the Terminal window.
# 3. Press Enter to execute the script.