Skip to content

Instantly share code, notes, and snippets.

View maprangzth's full-sized avatar

Komsan Kamsamur maprangzth

View GitHub Profile
@mrchoke
mrchoke / image2dockerfile.sh
Last active April 15, 2022 06:38
# การแสดงประวัติการสร้าง Docker image ด้วยคำสั่ง docker history
#!/bin/bash
# MrChoke
# Ref: https://docs.docker.com/engine/reference/commandline/history/
# Ref: https://stackoverflow.com/questions/19104847/how-to-generate-a-dockerfile-from-an-image
if [ $# -eq 0 ]; then
echo "No docker image provided."
echo -e "Example:\n"
echo -e "$0 nginx:latest\n"
exit 1
@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active May 4, 2024 18:20
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
@rain-1
rain-1 / Raspberry Pi, Static HTTPS site with Docker and Nginx.md
Last active April 3, 2024 18:17
Raspberry Pi, Static HTTPS site with Docker and Nginx

Raspberry Pi, Static HTTPS site with Docker and Nginx

This tutorial is dated Oct 2021, if it's much further on than that this information might be out of date.

This is a guide on setting up a static HTTPS website on your raspberry pi using docker and nginx. The aim is to have this running on the raspberry pi and to be able to access it from a host computer on the same local network. You should already be able to ssh into your pi from your host computer and have raspberry pi OS set up.

Find your raspberry pi

@andrewkroh
andrewkroh / wireguard-logger.sh
Last active September 1, 2022 21:42
Bash script to dump wireguard peers to JSON
#!/usr/bin/env bash
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
@quoeamaster
quoeamaster / es_docker_mbeat_01.yml
Created March 6, 2021 02:06
docker metricbeat 01
version: '2.2'
services:
node01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.11.1
#stdin_open: true # docker run -i
#tty: true # docker run -t
container_name: node01
environment:
- node.name=node01
- cluster.name=es-cluster-7
@ferdinandosimonetti
ferdinandosimonetti / ca-and-cert-with-san-and-ip.txt
Last active August 24, 2021 08:14
Self-signed CA + wildcard host certificate with Subject Alternative Names + IPs
### root-san.cnf
[ req ]
default_bits = 4096
distinguished_name = req_distinguished_name
req_extensions = req_ext
prompt = no
[ req_distinguished_name ]
countryName = IT
stateOrProvinceName = Milan
localityName = Milan
version: '3.7'
# starts 4 docker containers running minio server instances. Each
# minio server's web interface will be accessible on the host at port
# 9001 through 9004.
services:
minio1:
image: minio/minio:RELEASE.2020-08-18T19-41-00Z
volumes:
- data1-1:/data1
@zorteran
zorteran / logstash_check.sh
Last active August 29, 2020 06:27
Checking if logstash is alive
#!/bin/bash
logstash_response="$(curl --silent localhost:9600)"
if echo $logstash_response | grep -q '"status":"green"'
then
echo "Logstash is green. It's ok :-)"
exit 0
else
echo "Logstash is not green :-( plz help"
exit 1
fi
@zobayer1
zobayer1 / fedora_post_install.md
Last active April 4, 2024 12:06
Fedora 36 post installation notes for software developers. Things you should do after installing your new Fedora 36 workstation.

Fedora 36 Post Installation (For Software Developers)

Top N things you should do after installing or upgrading to your new Fedora 36 workstation.


Settings

Change Hostname