Skip to content

Instantly share code, notes, and snippets.

View pichuang's full-sized avatar

Phil Huang pichuang

View GitHub Profile
@pichuang
pichuang / import.sh
Created February 15, 2020 19:22
Quicky Import my personal cert and ssl
#!/bin/bash
cd /etc/pki/ca-trust/source/anchors/
wget http://bastion.pichuang.local/homecloud-pki/homecloud-chain.pem
update-ca-trust
@pichuang
pichuang / firewall-cmd allow 80 443
Last active February 2, 2020 18:28
Create Simple HTTPS Server using Python2 and Python3
#!/bin/bash
firewall-cmd --list-all
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=443/tcp --permanent
firewall-cmd --reload
firewall-cmd --list-all
@pichuang
pichuang / etc_sysconfig_gitlab
Created December 20, 2019 16:12
Running GitLab Container with podman and systemd
IMAGE=docker.io/gitlab/gitlab-ce:12.2.0-ce.0
HOSTNAME=gitlab.pichuang.local
NAME=gitlab-ce
apiVersion: "config.istio.io/v1alpha2"
kind: rule
metadata:
name: quota
namespace: istio-system
spec:
actions:
- handler: handler.memquota
instances:
- requestcount.quota
@pichuang
pichuang / br0.xml
Last active November 10, 2019 03:42
KVM
<network>
<name>br0</name>
<forward mode="bridge" />
<bridge name="br0" />
</network>
Usage: s3cmd [options] COMMAND [parameters]
S3cmd is a tool for managing objects in Amazon S3 storage. It allows for
making and removing "buckets" and uploading, downloading and removing
"objects" from these buckets.
Options:
-h, --help show this help message and exit
--configure Invoke interactive (re)configuration tool. Optionally
use as '--configure s3://some-bucket' to test access
@pichuang
pichuang / tuned.conf
Created May 3, 2019 14:14 — forked from likid0/tuned.conf
RHCS on All Flash Cluster : Performance Blog Series : tuned.conf profile for ceph nodes
cat /usr/lib/tuned/ceph-tuned/tuned.conf
[main]
summary=ceph_perf
[cpu]
governor=performance
energy_perf_bias=performance
min_perf_pct=100
force_latency=1
[defaults]
forks = 20
host_key_checking = False
roles_path = roles/
gathering = smart
fact_caching = jsonfile
fact_caching_connection = $HOME/ansible/facts
fact_caching_timeout = 600
log_path = ./ansible.log
nocows = 1
@pichuang
pichuang / redhat-10y.sh
Last active January 21, 2019 14:50
Red Hat #10yearchallenge + #10yearchallenge
#!/bin/bash
# 10 Years ago
for i in {1..10};
do
ssh ${i}.redhat.taiwan "echo before #10yearchallenge ";
done
# On-going
ansible -i redhat all -m command -a "echo next #20yearchallenge "
@pichuang
pichuang / ansible.cfg
Last active August 30, 2018 04:27
Recommended Ansible Configuration
[defaults]
forks = 20
host_key_checking = False
roles_path = roles/
gathering = smart
fact_caching = jsonfile
fact_caching_connection = /tmp/ansible/facts
fact_caching_timeout = 600
log_path = /tmp/ansible.log
nocows = 1