Skip to content

Instantly share code, notes, and snippets.

Avatar

KwangSeob Jeong lesstif

View GitHub Profile
@lesstif
lesstif / install-php-from-remi.sh
Last active Mar 8, 2021
install php package from remi repository
View install-php-from-remi.sh
#!/bin/bash
VERS="70 71 72 73 74 80"
PKGS="php72 php72-php-bcmath php72-php-cli php72-php-common php72-php-gd \
php72-php-gmp php72-php-intl php72-php-json php72-php-mbstring \
php72-php-mysqlnd php72-php-pdo php72-php-sodium \
php72-php-xml php72-runtime php72-php-fpm php72-php-process \
php72-php-pecl-igbinary php72-php-pecl-redis5 php72-php-pecl-zip "
@lesstif
lesstif / winget-package-install.ps1
Last active Apr 6, 2021
windows package install using winget package manager
View winget-package-install.ps1
## copy from https://gist.github.com/cdekkerpossibilit/d023602c29fdf039c7eabadf64f708e9
function Confirm-Choice {
param (
[string]$Message
)
$yes = new-Object System.Management.Automation.Host.ChoiceDescription "&Yes","Yes";
$no = new-Object System.Management.Automation.Host.ChoiceDescription "&No","No";
$choices = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no);
$answer = $host.ui.PromptForChoice("", $message, $choices, 1)
@lesstif
lesstif / nginx-vhost-docker-gitlab.conf
Created Jan 18, 2021
nginx 가상 호스트 설정
View nginx-vhost-docker-gitlab.conf
server {
listen 80;
server_name gitlab.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
server_name gitlab.example.com;
@lesstif
lesstif / nginx-ssl-tls-secure.conf
Created Nov 3, 2020
SSL/TLS secure configuration for nginx web server.
View nginx-ssl-tls-secure.conf
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers off;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_ecdh_curve secp384r1; # Requires nginx >= 1.1.0
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off; # Requires nginx >= 1.5.9
ssl_stapling on; # Requires nginx >= 1.3.7
@lesstif
lesstif / yum-list-installed.sh
Created Oct 22, 2020
RHEL 계열 배포판에서 yum/dnf 로 설치한 패키지 목록을 "dnf insatll " 구문을 붙여서 재출력(다른 서버에서 재활용하려고)
View yum-list-installed.sh
#!/bin/sh
PACKAG="php"
dnf list installed | grep ${PACKAG} | awk 'BEGIN {printf "dnf install -y " } {printf $1 " "}'
@lesstif
lesstif / custom.css
Created Oct 10, 2020
confluence theme plugin(scroll viewport ) 's custom stylesheet
View custom.css
@import url(//cdn.rawgit.com/openhiun/hangul/14c0f6faa2941116bb53001d6a7dcd5e82300c3f/nanumbarungothic.css);
@import url(//fonts.googleapis.com/css?family=Bree+Serif);
@import url(//fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,700italic,400,600,700);
@import url(//fonts.googleapis.com/css?family=Bitter:400,700,400italic);
@import url(//fonts.googleapis.com/css?family=Roboto:400,400i,500,500i,700,700i);
body {
color: #172b4d;
font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Apple SD Gothic Neo', 'Nanum Barun Gothic',
Segoe UI, Roboto, Oxygen, Ubuntu, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
@lesstif
lesstif / win95vercheck.c
Created Oct 7, 2020
windows 95가 버전 3.95인 이유 - 윈도우 개발 282 스토리에서 발췌
View win95vercheck.c
UINT Ver = GetVersion();
UINT MajorVersion = LOBYTE(uVer);
UINT MinorVersion = HIBYTE(uVer);
if (MajorVersion < 3 || MinorVersion < 10) {
Error("This program requires Windows 3.1");
}
@lesstif
lesstif / run-every-x-seconds.sh
Last active Oct 5, 2020
run some task every x second through cron
View run-every-x-seconds.sh
#!/usr/bin/env bash
SLEEP_SECOND=7
iter=0;
PARAM="s:h"
MUTEX=${HOME}/.run-x-seconds
LOGFILE=${HOME}/run-logfile
@lesstif
lesstif / manjaro-aur-package.sh
Last active Sep 30, 2020
만자로 리눅스(manjaro linux) AUR 패키지
View manjaro-aur-package.sh
#!/bin/bash
## install devel package
sudo pacman -Sy base-devel git
## install AUR-helper
sudo pacman -Sy yay
## install chrome
yay -Sy google-chrome
@lesstif
lesstif / sed-example.txt
Created Sep 16, 2020
example text file for sed
View sed-example.txt
unix is great os. unix is opensource. unix is free os.
learn operating system.
unix linux which one you choose.
unix is easy to learn.unix is a multiuser os.Learn unix .unix is a powerful.