Skip to content

Instantly share code, notes, and snippets.

View mrnonz's full-sized avatar
🎯
Focusing

Nontawat Numor mrnonz

🎯
Focusing
View GitHub Profile
@mrnonz
mrnonz / rke2-commands.md
Created March 28, 2024 04:37 — forked from superseb/rke2-commands.md
RKE2 commands

RKE2 commands

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server

Keybase proof

I hereby claim:

  • I am mrnonz on github.
  • I am mrnonz (https://keybase.io/mrnonz) on keybase.
  • I have a public key whose fingerprint is ECBF 6070 F782 F52D B4A7 A97E D21C EF77 EAAD D02D

To claim this, I am signing this object:

@mrnonz
mrnonz / README.md
Last active May 19, 2021 09:47 — forked from m1keil/README.md
Configure Kibana to use SAML with GSuite (Google Apps, GApps, G Suite)

The following worked with Elastic Cloud, Elasticsearch & Kibana v7.6.0. It should be pretty close for other kinds of deployments. Before starting, make sure you have the right license level that allows SAML.

Create SAML App in GSuite:

  • Navigate to the SAML apps section of the admin console
  • Click the Add button and choose to "SETUP MY OWN CUSTOM APP"
  • Write down the Entity ID and download the Idp metadata file
  • Choose application name, description and add logo
  • In the "Service Provider Details" screen add the following:
@mrnonz
mrnonz / Jenkinsfile
Created February 15, 2020 10:01 — forked from merikan/Jenkinsfile
Some Jenkinsfile examples
Some Jenkinsfile examples
@mrnonz
mrnonz / Gitlab-Runner-Startup-script.sh
Last active October 29, 2019 09:41
Startup script for VM to registration Gitlab Runner
sudo apt-get update
sudo wget -O /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64
sudo chmod +x /usr/local/bin/gitlab-runner
curl -sSL https://get.docker.com/ | sh
sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash
@mrnonz
mrnonz / yuzo-related-post-hacked.md
Last active April 10, 2019 12:34
Zero Day Vulnerability Yuzo Related Post plugin. I try to find where injected code into my Database

SELECT * FROM wp_options WHERE option_value LIKE '%eval(String.fromCharCode%';

and I got these value.

@mrnonz
mrnonz / add-ngx-pagespeed.sh
Last active September 4, 2018 07:00
Script for download ngxpagespeed modules, please specific your version `nginx -v`
bash <(curl -f -L -sS -k https://ngxpagespeed.com/install) \
--nginx-version "{version}" \
--dynamic \
-a '--with-http_ssl_module
--with-http_realip_module
--with-http_dav_module
--with-http_gzip_static_module
--with-http_gunzip_module
@mrnonz
mrnonz / sysctl.conf
Last active August 3, 2018 09:42
Harden the networking layer
# IP Spoofing protection
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
# Ignore ICMP broadcast requests
net.ipv4.icmp_echo_ignore_broadcasts = 1
# Disable source packet routing
net.ipv4.conf.all.accept_source_route = 0
net.ipv6.conf.all.accept_source_route = 0
@mrnonz
mrnonz / pagespeed_optimize_images.sh
Last active August 2, 2018 05:23
Recursively optimize all PNG and JPG files wherever they are from the script position and inner ( based on OPTING, PNGCRUSH, ADVANCECOMP and JPEGOPTIM )
#!/bin/bash
find . -type f -name "*.png" -o -name "*.PNG" | xargs optipng -nb -nc
find . -type f -name "*.png" -o -name "*.PNG" | xargs advpng -z4
find . -type f -name "*.png" -o -name "*.PNG" | xargs pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow
find . -type f -name "*.jpg" -o -name "*.JPG" | xargs jpegoptim -f --strip-all
## Log to file
# find . -type f -iname "*.png" -print0 | xargs -I {} -0 optipng -o5 -quiet -keep -preserve -log optipng.log "{}"
@mrnonz
mrnonz / docker-compose.yml
Created April 28, 2018 09:22 — forked from winggundamth/docker-compose.yml
Elasticsearch Cluster + Grafana Docker Compose File
version: '3'
services:
es1:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.4
container_name: es1
environment:
cluster.name: "docker-cluster"
bootstrap.memory_lock: "true"
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
TAKE_FILE_OWNERSHIP: "true"