Skip to content

Instantly share code, notes, and snippets.

View maprangzth's full-sized avatar

Komsan Kamsamur maprangzth

View GitHub Profile
@maprangzth
maprangzth / kafka-generate-ssl3.sh
Created October 30, 2019 13:46 — forked from anoopl/kafka-generate-ssl3.sh
Create Kafka JKS Keys
#!/bin/bash
#Step 1
#Generate server keystore and client keystore
keytool -keystore kafka.server.keystore.jks -alias localhost -validity 365 -genkey
keytool -keystore kafka.client.keystore.jks -alias localhost -validity 365 -genkey
#Step 2
#Create CA
openssl req -new -x509 -keyout ca-key -out ca-cert -days 365
#Add generated CA to the trust store
keytool -keystore kafka.server.truststore.jks -alias CARoot -import -file ca-cert
@maprangzth
maprangzth / single-node-es.md
Created May 25, 2021 05:14 — forked from angristan/single-node-es.md
Elasticsearch settings for single-node cluster (1 shard, 0 replica)

Elasticsearch settings for single-node cluster

1 shard, 0 replica.

For future indices

Update default template:

curl -X PUT http://localhost:9200/_template/default -H 'Content-Type: application/json' -d '{"index_patterns": ["*"],"order": -1,"settings": {"number_of_shards": "1","number_of_replicas": "0"}}' 
@maprangzth
maprangzth / deploy-automated-hadoop-setup-on-lxd.sh
Created April 21, 2021 07:24 — forked from ruanbekker/deploy-automated-hadoop-setup-on-lxd.sh
Sets up a Hadoop 3 Node Cluster with LXC Containers on LXD (Automated Install)
#!/bin/bash
set -ex
UBUNTU_VERSION="14.04"
mkdirs(){
#lxc delete hadoop-master --force
#lxc delete hadoop-slave-1 --force
#lxc delete hadoop-slave-2 --force
rm -rf /tmp/*
@maprangzth
maprangzth / fedora_post_install.md
Created February 15, 2021 09:10 — forked from zobayer1/fedora_post_install.md
Fedora 32 Post Installation (For Developers). Things you should do after installing your new Fedora workstation.

Fedora 31, 32, 33 Post Installation (For Developers)

Things you should do after installing your new Fedora workstation.

Settings

Change Hostname

  • Method (a): from Settings -> About, change Device Name.
@maprangzth
maprangzth / fix.sh
Created September 22, 2018 13:49 — forked from TheBeachMaster/fix.sh
Fix Docker WARNING: bridge-nf-call-iptables is disabled on Centos
$ sudo sysctl net.bridge.bridge-nf-call-iptables=1
$ sudo sysctl net.bridge.bridge-nf-call-ip6tables=1
@maprangzth
maprangzth / freeipa-openvpn.md
Created May 22, 2020 06:51 — forked from rechner/freeipa-openvpn.md
FreeIPA setup for OpenVPN logins

This article proved to be a decent starting point, but I was particularly interested in allowing password-based logins to OpenVPN using a username/password backed by FreeIPA (opposed to client certificates) as the identity provider.

  • IPA join your VPN machine: ipa-client-install --mkhomedir
  • Get a kerberos ticket: kinit
  • Create a Kerberos service principle and HBAC rule for openvpn access:
ipa service-add openvpn/`hostname`
  • Create new hbacrule in console, mark host as the VPN host, and whatever group you want to restrict access to:
@maprangzth
maprangzth / install.md
Created April 11, 2020 04:26 — forked from hjgraca/install.md
Install Jekyll in WLS2

First let's update everything I am running all commands as sudo but you run with the level you want

sudo apt-get update -y && sudo apt-get upgrade -y

Now let's install Ruby

@maprangzth
maprangzth / profile.json
Created April 10, 2020 04:21 — forked from shanselman/profile.json
Windows Terminal Profile
{
"defaultProfile": "{7d04ce37-c00f-43ac-ba47-992cb1393215}",
"initialRows": 30,
"initialCols": 120,
"alwaysShowTabs": true,
"showTerminalTitleInTitlebar": true,
"experimental_showTabsInTitlebar": true,
"requestedTheme": "dark",
"profiles": [
{
@maprangzth
maprangzth / sharing-ssh-session-with-tmate.md
Last active March 25, 2020 09:38
Sharing SSH-Session with "tmate"

Sharing SSH-Session with "tmate"

Disclaimer

  1. ผู้เขียนไม่มีส่วนรับผิดชอบต่อความผิดพลาดใด ๆ ที่อันจะเกิดขึ้นจากแชร์ session แบบ read-write กรุณารับผิดชอบด้วยตัวเอง!
  2. หากไม่รู้จักว่า tmux คืออะไรให้เปิด Google ครับ ท่านผู้นำบอกมา!!

tmate คืออะหยัง?

@version:3.2
# ===============================================================================================
# Configuration file for syslog-ng, customized for remote logging
# ===============================================================================================
# Options
# Note about $HOST / HOST
# Description: The name of the source host where the message originates from.
# If the message traverses several hosts and the chain_hostnames() option is on, the first host in the chain is used.
# If the keep_hostname() option is disabled (keep_hostname(no)), the value of the $HOST macro will be the DNS hostname of the host that sent the message to syslog-ng OSE (that is, the DNS hostname of the last hop). In this case the $HOST and $HOST_FROM macros will have the same value.