Skip to content

Instantly share code, notes, and snippets.

View yun14u's full-sized avatar

P T Nguyen yun14u

  • texas
View GitHub Profile
@matthewpalmer
matthewpalmer / pod.yaml
Last active April 24, 2024 00:00
Example Kubernetes pod for the multi-container sidecar design pattern
# Example YAML configuration for the sidecar pattern.
# It defines a main application container which writes
# the current date to a log file every five seconds.
# The sidecar container is nginx serving that log file.
# (In practice, your sidecar is likely to be a log collection
# container that uploads to external storage.)
# To run:
@Stono
Stono / create-docker-tls.sh
Last active February 27, 2024 08:17
Creating and setting up Docker for TLS
#!/bin/bash
# This script will help you setup Docker for TLS authentication.
# Run it passing in the arguement for the FQDN of your docker server
#
# For example:
# ./create-docker-tls.sh myhost.docker.com
#
# The script will also create a profile.d (if it exists) entry
# which configures your docker client to use TLS
#
@P7h
P7h / jdk_download.sh
Last active February 20, 2024 11:29
Script to download JDK / JRE / Java binaries from Oracle website from terminal / shell / command line / command prompt
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget.
### You can download all the binaries one-shot by just giving the BASE_URL.
### Script might be useful if you need Oracle JDK on Amazon EC2 env.
### Script is updated for every JDK release.
### Features:-
# 1. Resumes a broken / interrupted [previous] download, if any.
# 2. Renames the file to a proper name with including platform info.
@ivan-pinatti
ivan-pinatti / docker-configure-tls.sh
Last active January 13, 2024 19:32
Enable TLS in Docker service running in Ubuntu - #docker #docker-tls #tls #ubuntu
#!/usr/bin/env bash
: ' Script that enables TLS for Docker service in Ubuntu 16.x
This script is intended to be run as root
It;
- Generates the keys
- Creates the daemon.json Docker config file
@petruisfan
petruisfan / docker
Last active February 16, 2023 06:46
Docker init.d daemon script
#!/usr/bin/env bash
###############
# SysV Init Information
# description: docker daemon.
### BEGIN INIT INFO
# Provides: me
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 5
@aputs
aputs / logrotate-nginx
Created June 12, 2010 03:04
logrotate config for nginx
/var/log/nginx_*.log {
daily
compress
delaycompress
rotate 2
missingok
nocreate
sharedscripts
postrotate
test ! -f /var/run/nginx.pid || kill -USR1 `cat /var/run/nginx.pid`
@stonehippo
stonehippo / FTDI_Basic_Hookup_for_ESP-01.jpg
Last active January 6, 2022 14:09
Notes on using the ESP8266 with the Arduino IDE
FTDI_Basic_Hookup_for_ESP-01.jpg
@cgswong
cgswong / logstash.conf
Last active June 24, 2021 18:08
Logstash configuration file.
# #####################################################################
# DESC: Logstash configuration file. Typically forwarding logs to
# Elasticsearch instance.
# #####################################################################
# Where to get input
input {
# Get input from standard input device/interface
stdin {
type => "stdin-type"