Skip to content

Instantly share code, notes, and snippets.

KwangSeob Jeong lesstif

Block or report user

Report or block lesstif

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lesstif
lesstif / merge_ssl_cacert_for_nginx.sh
Last active Oct 23, 2019
nginx 를 위해 CA, Root CA 인증서를 SSL 인증서와 병합
View merge_ssl_cacert_for_nginx.sh
#!/bin/bash
if [ "$#" -lt 1 ]; then
echo "$# is Illegal number of parameters."
echo "Usage: $0 host_ssl_cert_path"
echo "Example: $0 /etc/pki/tls/certs/snake-oil.crt";
exit 1
fi
TARGET=$1
@lesstif
lesstif / nginx-vhost-example.conf
Created Oct 11, 2019
nginx virtual host setup example
View nginx-vhost-example.conf
server {
listen 80;
server_name example.com;
charset utf-8;
rewrite_log on;
access_log /var/log/nginx/jira-lesstif.com.access.log main;
error_log /var/log/nginx/jira-lesstif.com.error.log notice;
client_max_body_size 10M;
location / {
proxy_pass http://127.0.0.1:9080;
@lesstif
lesstif / nginx.conf
Created Oct 11, 2019
default nginx config
View nginx.conf
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
user nginx;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
@lesstif
lesstif / nginx.conf
Created Oct 11, 2019
default nginx config
View nginx.conf
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
user nginx;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
@lesstif
lesstif / profiles.json
Created Oct 6, 2019
Windows Terminal Profiles.json
View profiles.json
{
"globals" :
{
"alwaysShowTabs" : true,
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :
[
{
@lesstif
lesstif / pngquant-compile.sh
Created Aug 29, 2019
compile script for pngquant on RHEL/CentOS and Amazon Linux
View pngquant-compile.sh
#!/bin/bash
git clone https://github.com/kornelski/pngquant
cd pngquant
git checkout -b 2.12.3
sudo yum install libpng-devel -y
make
sudo make install
@lesstif
lesstif / systemd-service-contrl.sh
Last active Nov 5, 2019
add or remove daemon server on systemd
View systemd-service-contrl.sh
#!/bin/bash
function usage {
echo "USAGE: $0 param..";
echo -e "\t-s SERVICE: service full path";
echo -e "\t-d DESCRIPTION: service desc";
echo -e "\t-r RUNAS : specify the Unix user/group of processes";
echo -e "\t-p PARAM: param to pass service runnin";
echo ""
@lesstif
lesstif / minio-nginx-vhost.conf
Created Aug 16, 2019
setup nginx proxy with minio server
View minio-nginx-vhost.conf
##
server {
listen 80;
server_name minio.example.com;
# To allow special characters in headers
ignore_invalid_headers off;
# Allow any size file to be uploaded.
# Set to a value such as 1000m; to restrict file size to a specific value
client_max_body_size 0;
# To disable buffering
@lesstif
lesstif / MinIOStorageServiceProvider.php
Created Aug 13, 2019
MinIO Storage ServiceProvider for PHP Laravel
View MinIOStorageServiceProvider.php
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Aws\S3\S3Client;
use League\Flysystem\AwsS3v3\AwsS3Adapter;
use League\Flysystem\Filesystem;
use Storage;
@lesstif
lesstif / generate-nginx-blacklist-from-error-logfile.sh
Last active Aug 6, 2019
to extract malicious web request client ip and add into nginx blacl list file.7
View generate-nginx-blacklist-from-error-logfile.sh
#!/bin/bash
TMP1=/tmp/tmp-black-list
NGINX_LOG=/var/log/nginx/error.log
grep '.php\|.cfg' ${NGINX_LOG} | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" | sort | uniq | awk '{print "deny "$0";"}' > ${TMP1}
## copy original block ips file
D=$(date '+%Y-%m-%d')
You can’t perform that action at this time.