Skip to content

Instantly share code, notes, and snippets.

xddxdd /
Created Jul 30, 2022
All startup scripts executed by OpenVZ 7 in guest
# Copyright (c) 2001-2017, Parallels International GmbH
# Copyright (c) 2017-2019 Virtuozzo International GmbH. All rights reserved.
# This file is part of OpenVZ libraries. OpenVZ is free software; you can
# redistribute it and/or modify it under the terms of the GNU Lesser General
# Public License as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful, but
xddxdd / nginx-plain-proxy.patch
Created Jul 17, 2021
Patch for nginx to support plain (one-line request) protocol upstreams
View nginx-plain-proxy.patch
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
index 64190f1..dbba290 100644
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -283,6 +283,8 @@ static ngx_conf_post_t ngx_http_proxy_ssl_conf_command_post =
static ngx_conf_enum_t ngx_http_proxy_http_version[] = {
+ { ngx_string("plain"), NGX_HTTP_VERSION_PLAIN },
+ { ngx_string("0.9"), NGX_HTTP_VERSION_9 },
xddxdd / lantian_whois.lua
Last active May 29, 2021
Lan Tian's nginx-based DN42 WHOIS server config
View lantian_whois.lua
local lantian_whois = {}
function lantian_whois.file_exists(subdir, target)
if target == nil then return false end
local f = .. "/" .. subdir .. "/" .. string.gsub(target, "/", "_"), "rb")
if f == nil then return false end
return true
xddxdd / 0-hexo-gopher.txt
Last active Mar 24, 2021
Gophermaps generation code for Hexo
View 0-hexo-gopher.txt
Here's my code to generate Gophermaps for posts on a Hexo site.
I cannot guarantee this will work on your Hexo site. I had custom multilingual support on my site,
and manually removed all language related stuff from this code snippet. I did not test that the
code still functions after this modification.
Put gopher.js into "scripts" folder of your theme, e.g. "themes/lantian/scripts/gopher.js".
xddxdd / nginx-1.19.7-plain-protocol.patch
Last active May 10, 2021
Patch for nginx 1.19.7 to support plaintext protocol (like Gopher or Whois)
View nginx-1.19.7-plain-protocol.patch
diff --git a/auto/modules b/auto/modules
index f1c63f3d..516daaba 100644
--- a/auto/modules
+++ b/auto/modules
@@ -423,6 +423,18 @@ if [ $HTTP = YES ]; then
. auto/module
+ if [ $HTTP_PLAIN = YES ]; then
+ have=NGX_HTTP_PLAIN . auto/have
xddxdd / kitty.conf
Created Jan 16, 2021
Kitty font & color settings
View kitty.conf
font_family FiraCodeNerdFontComplete-Retina
bold_font FiraCodeNerdFontComplete-Bold
italic_font FiraCodeNerdFontComplete-Retina
bold_italic_font FiraCodeNerdFontComplete-Bold
font_features FiraCodeNerdFontComplete-Retina +ss03 +ss04 +ss05 +ss06 +ss07 +zero
font_features FiraCodeNerdFontComplete-Bold +ss03 +ss04 +ss05 +ss06 +ss07 +zero
background #212121
foreground #eeffff