Skip to content

Instantly share code, notes, and snippets.

@QuantumGhost
QuantumGhost / ssh_config
Last active August 6, 2017 13:34
Hardened ssh
# Github already dropped support for diffie-hellman-group1-sha1 and diffie-hellman-group14-sha1
# FYI: https://githubengineering.com/crypto-deprecation-notice/
# Host github.com
# KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
Host *
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
PasswordAuthentication no # comment this if you need password authentication (for example ssh into a VM)
ChallengeResponseAuthentication no
PubkeyAuthentication yes
class Symbol:
__registry = {}
__lock = Lock()
__slots__ = ('name',)
def __new__(cls, name):
instance = cls.__registry.get(name)
if not instance:
with cls.__lock:
# A classical double-checked lock pattern.
adb shell appops set com.tencent.mm OP_READ_PHONE_STATE ignore
adb shell appops set com.tencent.mm COARSE_LOCATION ignore
adb shell appops set com.tencent.mm FINE_LOCATION ignore
adb shell appops set com.tencent.mm RUN_IN_BACKGROUND ignore
@QuantumGhost
QuantumGhost / introrx.md
Created February 2, 2018 06:18 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@QuantumGhost
QuantumGhost / etc.fstab
Created May 5, 2018 08:22 — forked from vadviktor/etc.fstab
Ubuntu guest VMware shared folders using open-vm-tools package and vmhgfs-fuse
.host:/vmshared /mnt/vmshared fuse.vmhgfs-fuse allow_other,uid=1000,gid=1000,auto_unmount,defaults 0 0
### Keybase proof
I hereby claim:
* I am quantumghost on github.
* I am quantumghost (https://keybase.io/quantumghost) on keybase.
* I have a public key whose fingerprint is C685 98CD AF85 11D1 6CB9 0610 B29A 1408 6516 184D
To claim this, I am signing this object:
@QuantumGhost
QuantumGhost / mesalink_release_v0.6.0_chn.md
Created April 3, 2019 08:03 — forked from ymjing/mesalink_release_v0.6.0_chn.md
MesaLink v0.6.0 released [Chinese version]

Personal Tech stack

Go

Queue:

  • NATS for messaging queue.

Database:

@QuantumGhost
QuantumGhost / hosts
Created June 17, 2019 23:38 — forked from alswl/hosts
hosts for OpenWRT, for disable AD in xiaomi TV
127.0.0.1 api.ad.xiaomi.com
127.0.0.1 sdkconfig.ad.xiaomi.com
127.0.0.1 ad.mi.com
127.0.0.1 ad.xiaomi.com
127.0.0.1 ad1.xiaomi.com
127.0.0.1 adv.sec.miui.com
127.0.0.1 test.ad.xiaomi.com
127.0.0.1 new.api.ad.xiaomi.com
@QuantumGhost
QuantumGhost / how-clowwindy-design-Shadowsocks.md
Created March 12, 2017 14:24
clowwindy设计Shadowsocks的思路分析以及设计理念

clowwindy设计Shadowsocks的思路分析以及设计理念

鄙人不才,尝试站在原作者clowwindy的角度,来分析一下原版协议的设计思路和理念。 没参与过最初开发,不过设计了AEAD这个协议。读了一些资料,评论。

7:58 PM, 31 Aug 2015 作者发了这么一段话,我很好奇其中的指代内容,遂有本文。

眼睁睁看着一群人把一个东西搞错然后朝着错误的方向走了。不过懒得管了 =。=