Skip to content

Instantly share code, notes, and snippets.

View lesstif's full-sized avatar

KwangSeob Jeong lesstif

View GitHub Profile
@lesstif
lesstif / firewallcmd-drop-client.sh
Last active September 2, 2020 23:21
fail2ban 으로 jail 된 IP 를 firewall 에서 차단하기 위한 script
#!/bin/bash
function usage {
echo "USAGE: $0 -z ZONE -i BLOCK-IP1,BLOCK-IP2"
echo ""
echo "$0 -z dmz -i block-ip1,block-ip2"
echo "$0 -z dmz -f block-ip-file"
exit 1
}
@lesstif
lesstif / nginx-with-tls13-compile.sh
Last active July 12, 2024 00:36
openssl 1.1 & nginx compile script for TLS 1.3 support on RHEL/CentOS 7
#!/bin/bash
## nginx
NGINX=nginx-1.19.4.tar.gz
if [ ! -f "${NGINX}" ];then
wget https://nginx.org/download/${NGINX}
fi
ND=$(basename $NGINX .tar.gz)
@lesstif
lesstif / yum-mirror-change.php
Last active March 21, 2019 06:35
change to yum mirror repository to korea ISP.
<?php
// mirror list
$mirror_list = [
'cdnetworks' => 'http://centos.mirror.cdnetworks.com/$releasever/os/$basearch/',
'naver' => 'http://mirror.navercorp.com/centos/$releasever/os/$basearch/',
'kakao' => 'http://mirror.kakao.com/centos/$releasever/os/$basearch/',
];
// root 가 아니면 현재 폴더에 생성
@lesstif
lesstif / ALPHASSL CA SHA256 G2.crt
Last active October 30, 2019 02:35
SSL/TLS 인증서 체인 검증을 위한 CA/ROOT CA 인증서 모음(SSL/TLS Intermediate Certificate archive for chain validation)
## Root 인증서는 하단의 GlobalSign Root CA - R1
## Version: 3 (0x2)
## Serial Number:
## 04:00:00:00:00:01:44:4e:f0:36:31
## Signature Algorithm: sha256WithRSAEncryption
## Issuer: C = BE, O = GlobalSign nv-sa, OU = Root CA, CN = GlobalSign Root CA Validity
## Not Before: Feb 20 10:00:00 2014 GMT
## Not After : Feb 20 10:00:00 2024 GMT
## Subject: C = BE, O = GlobalSign nv-sa, CN = AlphaSSL CA - SHA256 - G2
@adamwathan
adamwathan / Statamic+Tailwind+PurgeCSS.md
Last active February 22, 2025 21:48 — forked from binoclard/Statamic+Tailwind+PurgeCSS.md
Fresh Statamic install, with Tailwind CSS and PurgeCSS configured

In 5 minutes, you’ll have a brand new clean Statamic site, with Tailwind CSS and PurgeCSS configured.

It assumes that you work on a Mac, you put your site in ~/sites and you use Laravel Valet.

All the credit go to Jack McDade and philipboomy, from whom I stole and adapt the build scripts and the PurgeCSS config, this is only a detailed write up of the process.

You'll need Yarn and Node. You can install them both in one command via Brew: brew install yarn

@lesstif
lesstif / wsl2-troubleshooting-list.md
Last active June 19, 2019 04:59
WSL 2 troubleshooting

"A device attached to the system is not functioning."

"시스템에 부착된 장치가 작동하지 않습니다." 란 메시지가 나오고 WSL 이 동작 안 함.

  1. windows 서비스에 "Host Network Service"(호스트 네트워크 서비스)가 구동되었는지 확인
  2. "Technitium DNS server" 나 "Acrylic DNS Proxy" 같은 DNS 서버가 떠 있는지 확인(laravel valet 때문에 "Acrylic DNS Proxy" 를 설치했더니 저 에러 발생함
@lesstif
lesstif / .gitignore
Last active December 24, 2019 09:29
global gitignore for laravel,phpstorm(Intellij), vim, OSX, Linux
##
## git config --global core.excludesfile ~/.gitignore
## laravel default gitignore
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
/nova
@lesstif
lesstif / laravel-nova-snippets.md
Last active July 10, 2019 07:21
laravel nova snippets

Nova Resource

아래 명령어로 생성하는 nova resource 관련 snippets.

php artisan nova:resource MyResource

Pagination

@lesstif
lesstif / nginx-logrotate
Last active August 6, 2019 07:36
log roate script for nginx(/etc/logrotate.d/nginx)
/var/log/nginx/*.log {
daily
missingok
rotate 52
compress
delaycompress
notifempty
create 640 nginx adm
sharedscripts
postrotate
@lesstif
lesstif / minio-nginx-vhost.conf
Created August 16, 2019 02:23
setup nginx proxy with minio server
##
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