Skip to content

Instantly share code, notes, and snippets.

View Demon-Hunter's full-sized avatar

Demon.Hunter Demon-Hunter

View GitHub Profile
@shui
shui / after-install.md
Last active November 19, 2023 09:45
阿里云ECS安装后……

删除阿里云ECS登录欢迎信息

阿里云镜像修改了欢迎信息:

Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-105-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage
@soheilhy
soheilhy / nginxproxy.md
Last active May 8, 2024 09:56
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@huyx
huyx / adbapi.py
Last active December 10, 2020 04:02
Twisted MySQL 接口扩展,支持: - 自动重连 - 返回INSERT的自增ID - 返回多个查询结果集
# -*- coding: utf-8 -*-
from twisted.enterprise import adbapi
from twisted.python import log
import MySQLdb
import itertools
class ReconnectingMixin:
"""MySQL 重新连接时, ConnectionPool 可以正确执行指定的操作,流程是:
- 执行操作