Skip to content

Instantly share code, notes, and snippets.

View xja's full-sized avatar
🇨🇿

xja

🇨🇿
View GitHub Profile
@mcxiaoke
mcxiaoke / miui-blotware-apps.md
Last active September 16, 2024 15:46
MIUI 13/14 bloatware apps, updated at 20240816

对于所有应用,不建议直接删除,使用adb shell pm disable-user package-name禁用即可,方便出问题时恢复。

DO NOT UNINSTALL:

  • com.miui.securitycenter
  • com.miui.securityadd
  • com.xiaomi.finddevice

(Don’t uninstall these three apps or services from your Xiaomi device. Otherwise, you may encounter device bricking or bootloop issues.)

@tinkernels
tinkernels / 0-tcp_bbrplus.md
Last active August 30, 2023 13:32
patch tcp_bbr with bbr_drain_to_target_cycling (bbrplus)
@mzpqnxow
mzpqnxow / DiscordSOCKS5.md
Created August 24, 2020 04:45
Use SOCKS5 proxy with Discord on Linux

Using SOCKS5 Proxy With Discord on Linux

You may only need the environment or the command-line parameter to force Discord to use a proxy. It doesn't hurt to use both

So if you're behind a firewall and need to go through, e.g. an SSH dynamic port forward (a SOCKS5 channel inside an SSH session) you can use the following:

$ nohup ssh -D1080 proxy_server &
$ http_proxy=socks5://127.0.0.1:1080 https_proxy=socks5://127.0.0.1:1080 /opt/Discord/Discord --proxy-server="socks5://127.0.0.1:1080"
@oofnikj
oofnikj / answerfile
Last active September 18, 2024 22:51
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@likeablob
likeablob / 01-yet-another-minicap-python3-client.md
Last active May 8, 2024 08:54
A simple minicap client with python3

minicap-python3-client

minicap installation

Plan A: Use minicap-prebuilt

$ npm init -y
$ npm i -S minicap-prebuilt
$ ls node_modules/minicap-prebuilt/prebuilt/
@jackdesert
jackdesert / gist:3015200944599fe2f13853287ad4e670
Created July 10, 2018 14:00
pip install uwsgi - python3_plugin.so no found
# Install System-wide
sudo apt install -y uwsgi-core uwsgi-plugin-python3
# Run system uwsgi: this works!
$ cd ~/myproject
$ uwsgi --ini production.ini
[uWSGI] getting INI configuration from production.ini
# Install uwsgi via pip
@thomaswieland
thomaswieland / gist:3cac92843896040b11c4635f7bf61cfb
Created February 17, 2018 13:56
Python: IMAP IDLE with imaplib2
import imaplib2, time
from threading import *
# This is the threading object that does all the waiting on
# the event
class Idler(object):
def __init__(self, conn):
self.thread = Thread(target=self.idle)
self.M = conn
self.event = Event()
@corona6
corona6 / README.md
Last active November 11, 2021 14:56
delete unused resources/revisions/tags for Joplin https://github.com/corona6/joplinclean
@nrollr
nrollr / nginx.conf
Last active September 16, 2024 18:07
NGINX config for SSL with Let's Encrypt certs
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
}
# SSL configuration
@BravoTango86
BravoTango86 / Base32.cs
Created September 20, 2016 22:03
Base32 Encoding and Decoding in C#
/*
* Derived from https://github.com/google/google-authenticator-android/blob/master/AuthenticatorApp/src/main/java/com/google/android/apps/authenticator/Base32String.java
*
* Copyright (C) 2016 BravoTango86
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0