Skip to content

Instantly share code, notes, and snippets.

View wey-gu's full-sized avatar
🥑
Believe in OpenSource and build in public w/ magic to help others do the same.

Wey Gu wey-gu

🥑
Believe in OpenSource and build in public w/ magic to help others do the same.
View GitHub Profile
@ArrEssJay
ArrEssJay / env.conf
Last active April 22, 2018 07:59
ngrok / ngrok2 systemd script + config
# /lib/systemd/system/ngrok.service.d/env.conf
[Service]
#which tunnel, or all?
Environment="TUNNEL=--all"
#log format
Environment="LOG_FORMAT=logfmt"
#log level
@kukat
kukat / aria2.conf
Last active May 4, 2019 09:50
aria2 startup script for synology
#允许rpc
enable-rpc=true
#允许所有来源, web界面跨域权限需要
rpc-allow-origin-all=true
#允许非外部访问
rpc-listen-all=true
#RPC端口, 仅当默认端口被占用时修改
#rpc-listen-port=6800
#最大同时下载数(任务数), 路由建议值: 3
max-concurrent-downloads=5
#!/bin/zsh
printf "%dGi/32Gi" $(cat /proc/meminfo | awk '{print $2}' | head -n 2 | tail -n 1)/1024/1024
@cmabastar
cmabastar / haproxy.conf
Created June 17, 2016 06:08
Haproxy for flask-socketio
global
daemon
defaults
mode http
log global
option httplog
option http-server-close
option dontlognull
option redispatch
@junaid18183
junaid18183 / haproxy_socat
Last active November 4, 2020 09:29
Haproxy stats with Socat
#Source - http://www.haproxy.org/download/1.5/doc/configuration.txt
# Section - 9.2. Unix Socket commands
#show stat [<iid> <type> <sid>]
# Dump statistics in the CSV format. By passing <id>, <type> and <sid>, it is
# possible to dump only selected items :
# - <iid> is a proxy ID, -1 to dump everything
# - <type> selects the type of dumpable objects : 1 for frontends, 2 for
# backends, 4 for servers, -1 for everything. These values can be ORed,
# for example:
@m4ce
m4ce / haproxy.cfg
Created March 16, 2017 16:33
FreeIPA behind HAProxy
frontend ft_ipa
mode http
bind 0.0.0.0:80
bind 0.0.0.0:443 ssl crt /etc/haproxy/ssl/ipa.example.org.pem
redirect scheme https if !{ ssl_fc }
use_backend bk_ipa
backend bk_ipa
@yuuichi-fujioka
yuuichi-fujioka / install package to qcow image.sh
Created April 17, 2014 04:14
install apt-get package to qcow2 image
sudo apt-get install qemu-utils
sudo modprobe nbd
sudo qemu-nbd --connect=/dev/nbd0 /full/path/to/qcow2/image/file
sudo mkdir /mnt/ubuntu
sudo mount /dev/nbd0p1 /mnt/ubuntu
@beekhof
beekhof / pcs-crmsh cheatsheet.md
Last active October 24, 2021 23:17
Transition guide for common crmsh commands

Display the configuration

crmsh # crm configure show
pcs   # pcs cluster cib

Display the current status

crmsh # crm_mon -1
pcs   # pcs status
@Aethylred
Aethylred / freeipa_auth_suse.md
Last active February 26, 2022 23:54
Setting up FreeIPA authentication onf SUSE/SLE 12 SP2

This is the manual process for enrolling a host running SUSE/SLE 12 SP2 with FreeIPA.

The following reference documentation was used to create this process:

I do not recommend using yast to set this up, however it is useful to check if the configuration is valid. SUSE/SLE has all the required packages to use FreeIPA but does not have the conveinent ipa-client tools, such as ipa-client-install.

Pre-Requisites