Skip to content

Instantly share code, notes, and snippets.

@gtt116
gtt116 / docker-compose.yml
Created August 25, 2020 11:10
the configuration to set prometheus behind nginx
version: "2"
services:
prom:
image: prom/prometheus:v2.20.1
volumes:
- /data/prometheus:/prometheus
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- ./inner_configs:/etc/prometheus/inner_configs
@gtt116
gtt116 / install_fpm.sh
Last active July 25, 2017 06:55 — forked from boardstretcher/install_fpm.sh
Install FPM on centos 6.5
# install ruby, rubygems and all requirements, then install FPM (effing package manager)
# fpm: https://github.com/jordansissel/fpm
# as root
# update system, install requirements
yum makecache
yum install ruby-devel gcc curl libyaml-devel
# get the ruby version manager and install
curl -L get.rvm.io | bash -s stable
@gtt116
gtt116 / gist:e7abe1c32a46df85b7599fbc7a9f9f73
Created April 25, 2017 02:33
autossh supervisord config file
[program:autossh]
command=autossh -M0 -N
-o "ExitOnForwardFailure yes"
-o "ServerAliveInterval 15"
-o "ServerAliveCountMax 4"
-o "ControlPath none"
-o "UserKnownHostsFile=/dev/null"
-o StrictHostKeyChecking=no
-R 1234:localhost:1234
-R 4567:localhost:4567
@gtt116
gtt116 / nginx.conf
Created March 11, 2017 15:41 — forked from v0lkan/nginx.conf
Configuring NGINX for Maximum Throughput Under High Concurrency
user web;
# One worker process per CPU core.
worker_processes 8;
# Also set
# /etc/security/limits.conf
# web soft nofile 65535
# web hard nofile 65535
# /etc/default/nginx
@gtt116
gtt116 / gist:a920012addf9df6b9e39a1b285f0f2f8
Created November 10, 2016 06:55
Make default string in elasticsearch not analyze
curl -XPUT 192.168.1.223:9200/_template/template_not_analyzed -d '{
"template": "*",
"mappings": {
"_default_": {
"_all": {
"enabled": true
},
"dynamic_templates": [
{
"string_fields": {
apiVersion: v1
kind: Pod
metadata:
name: kube-controller
spec:
hostNetwork: true
volumes:
- name: "etc-kubernetes"
hostPath:
path: "/etc/kubernetes"
@gtt116
gtt116 / SecureCRT solarized dark
Created June 3, 2016 06:37
solarized dark color scheme for VanDyke SecureCRT
solarized dark color scheme for VanDyke SecureCRT (c.f. http://ethanschoonover.com/solarized )
edit %appdata%\VanDyke\Config\Global.ini, find the line marked B:"ANSI Color RGB" and replace the two hex strings below it with the ones listed here:
B:"ANSI Color RGB"=00000040
07 36 42 00 dc 32 2f 00 85 99 00 00 b5 89 00 00 26 8b d2 00 d3 36 82 00 2a a1 98 00 ee e8 d5 00
00 2b 38 00 cb 4b 16 00 58 6e 75 00 65 7b 83 00 83 94 96 00 6c 71 c4 00 93 a1 a1 00 fd f6 e3 00
@gtt116
gtt116 / solarized-dark.xcs
Created May 14, 2016 02:39 — forked from clyfish/solarized-dark.xcs
xshell solarized dark color theme
[Solarized Dark]
text(bold)=839496
magenta(bold)=6c71c4
text=839496
white(bold)=fdf6e3
green=859900
red(bold)=cb4b16
green(bold)=586e75
black(bold)=073642
red=dc322f
[defaults]
remote_user = userx
remote_port = 22
gathering = explicit
roles_path = roles
retry_files_save_path = /tmp/
host_key_checking = False
vault_password_file = vault-pass
forks = 100
#private_key_file=/path/to/file.pem
[program:ss0]
command = /home/superuser/shadowsocks/shadowsocks-server-linux64-1.1.3 -c server-config0.json
directory = /home/superuser/shadowsocks
user = superuser
autostart = true
autorestart = true
stdout_logfile = /var/log/supervisor/ss0.log
stderr_logfile = /var/log/supervisor/ss0_err.log
environment=HOME="/home/superuser/",USER="superuser"