Skip to content

Instantly share code, notes, and snippets.

View ciiiii's full-sized avatar
🌏
UTC+8

Yisheng Cai ciiiii

🌏
UTC+8
View GitHub Profile
@ciiiii
ciiiii / block.yaml
Created March 23, 2022 08:35
playbook with block and rescue
---
- hosts: k8s-cluster
gather_facts: false
any_errors_fatal: true
tasks:
- name: try block
when: inventory_hostname not in groups['kube-master']
block:
- name: first try
command: /bin/false
@ciiiii
ciiiii / core.css
Last active April 20, 2022 15:22
static files
:root {
--page-width: 616px;
--page-order: row-reverse;
}
html,
body,
.roam-app {
background-color: var(--bg-color) !important;
overflow: hidden !important;
BEGIN MESSAGE.
fqKX4ucAQpx0GM0 C3TDEKkG2NXOolt e4wZqa2i70w2N2J Yyv36rorQEOmDju
8ITfsWp0QgwW6Dc qR1Eg8IvcdhTCKq 6Xr2MZHgg4XJTwh 1s4noPmpeFCkHFw
BeUwsKIbfDcX2A9 MPhPjImR2TLZHrm kzVDBdZdG7PsNEg VaSBNd2OWoiyHIW
UxGCbfnYSma2ymy HtPTN7giUAkETVg Oqktu21.
END MESSAGE.
# -----------------------
# Kong configuration file
# -----------------------
#
# The commented-out settings shown in this file represent the default values.
#
# This file is read when `kong start` or `kong prepare` are used. Kong
# generates the Nginx configuration with the settings specified in this file.
#
# All environment variables prefixed with `KONG_` and capitalized will override
# -----------------------
# Kong configuration file
# -----------------------
#
# The commented-out settings shown in this file represent the default values.
#
# This file is read when `kong start` or `kong prepare` are used. Kong
# generates the Nginx configuration with the settings specified in this file.
#
# All environment variables prefixed with `KONG_` and capitalized will override
@ciiiii
ciiiii / Dockerfile
Last active January 21, 2024 12:30
Postgresql for Chinese Full-Text Search.中文全文搜索
# If you don‘t want to build it youself, you can try `docker pull killercai/postgres`.
FROM healthcheck/postgres:latest
# China debian mirror
RUN sed -i s@/deb.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN apt-get clean && apt-get update
RUN apt-get install -y wget git build-essential libpq-dev python-dev postgresql-server-dev-all
# SCWS (Simple Chinese Word Segmentation library)
RUN cd /tmp && wget -q -O - http://www.xunsearch.com/scws/down/scws-1.2.1.tar.bz2 | tar xjf - && cd scws-1.2.1 && ./configure && make install
# zhpaser (postgres plugin)
@ciiiii
ciiiii / fuck-datetime.py
Created August 22, 2018 04:36
python get time of one timezone
import datetime
from pytz import timezone
now = datetime.datetime.now(tz=timezone('UTC')).astimezone(timezone('Asia/Shanghai'))
@ciiiii
ciiiii / docker-compose.yml
Last active February 3, 2018 11:55
posgresql(healthcheck) docker-compose
version: '2.1'
services:
postgres:
# image: sameersbn/postgresql:9.6-2
image: healthcheck/postgres
ports:
- "5432:5432"
environment:
- POSTGRES_DB=pgname
- POSTGRES_USER=pguser