Skip to content

Instantly share code, notes, and snippets.

@rxaviers
rxaviers / gist:7360908
Last active April 22, 2025 01:30
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@staltz
staltz / introrx.md
Last active April 21, 2025 04:15
The introduction to Reactive Programming you've been missing
@Lukasa
Lukasa / netlink_ifnew.py
Created March 4, 2015 09:26
Monitor for new links using Python and Netlink
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 21, 2025 16:19
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized
@gregopet
gregopet / Jooq.java
Created November 1, 2019 20:23
jOOQ plain SQL examples
jooq.fetchOne("select * from film limit 1");
// type safety for fields
jooq.fetchOne("select * from film limit 1").get(FILM.TITLE);
jooq.fetchOne("select title || ' ' || description from film limit 1").get(0, String.class);
// parameters
jooq
.fetchOne("select title || ' ' || description from film where title like ? limit 1", "DINOSAUR%")
.get(0, String.class);
@coolreader18
coolreader18 / segfault.py
Last active March 30, 2024 08:05
CPython segfault in 5 lines of code
class E(BaseException):
def __new__(cls, *args, **kwargs):
return cls
def a(): yield
a().throw(E)

中国移动在为用户安装宽带时,总会好心地“赠送”一个光猫(调制解调器)。这看似是个不错的促销手段,但通常情况下,这个“赠品”会给用户带来许多麻烦。

赠送的“光猫”安装了许多不必要的功能。光猫的本职工作是进行光电转换,然而中国移动的“光猫”不仅承担着光电转换的任务,还同时进行拨号上网、路由、地址转换(NAT)、端口映射、文件服务器(FTP)等等额外的功能。这些功能让本就廉价而算力低下的光猫运行缓慢,不堪重负。最可气的是,中国移动为了节约维护成本,将光猫的绝大多数设置项锁定,防止用户修改。为了重新“拥有”光猫,我决定夺回对光猫的控制权。

适用范围

  • 中国移动产品
  • 能够开启Telnet服务

我的型号是H2-2。下列操作理论上使用于其他型号。

"""
This pure-python ChaCha20 implementation reaches 32MiB/sec on my machine (M1 Pro)
otoh, cryptography.io's impl reaches about 1700MiB/s. Way faster, of course, but only about 50x faster.
This is code is a proof-of-concept and should not be used in a security context.
"""
CONST_MAGIC = b"expand 32-byte k"
CONST_WORDS = [int.from_bytes(CONST_MAGIC[i:i+4], "little") for i in range(0, 16, 4)]