Skip to content

Instantly share code, notes, and snippets.

version: '3'
services:
server:
image: parseplatform/parse-server:latest
restart: always
ports:
- '10020:1337'
environment:
PARSE_SERVER_DATABASE_URI: mongodb://mongo/parse-server
@jinuljt
jinuljt / nginx.md
Last active January 27, 2021 09:41

HTTP自定义Header (HTTP user-defined header)

明道云私有化部署遇到的坑。它使用了一个自定义http header md_pss_id

根据nginx文档说明,自定义header默认不会传递给upstream。

By default, nginx does not pass the header fields “Date”, “Server”, “X-Pad”, and “X-Accel-...” from the response of a proxied server to a client. The proxy_hide_header directive sets additional fields that will not be passed. If, on the contrary, the passing of fields needs to be permitted, the proxy_pass_header directive can be used.

需要如下配置:

## filter 坑
已知有field {"host": "<ip>"}
想要转换为:
{"host": {"ip": "<ip>", "name": "<hostname>"}
以下方法都失败了,改用 {"new_host": {"ip": "<ip>", "name": "<hostname>"} 可以成功。应该是重用field会继承之前的类型导致的。目前没找到方案。
- mutate rename/add_field
- ruby
@jinuljt
jinuljt / water_sort_puzzle_solver.py
Last active April 15, 2021 09:45
水排序拼图 python soulver
"""
version 1 穷举
# 一个瓶子有4段水
# 瓶子初始化,每一段水可以为不同颜色
# 每次倒出一种颜色(多段水一次倒出)
# 倒入颜色必须与瓶子最上层颜色相同
#
# 数字表示水的颜色
@jinuljt
jinuljt / report_export.user.js
Last active August 13, 2021 07:06
report_export.user.js
// ==UserScript==
// @name report export
// @namespace https://gist.github.com/jinuljt/b8c3a2ee5a61bc81cc20b163fd7d30de/
// @version 0.1
// @description 导出坎弓骑会战报表
// @author gugu
// @match https://www.bigfun.cn/tools/gt/t_report
// @icon https://www.google.com/s2/favicons?domain=bigfun.cn
// @grant GM_setClipboard
// ==/UserScript==