sudo docker run -it --rm --name certbot \
-v '/etc/letsencrypt:/etc/letsencrypt' \
-v '/var/lib/letsencrypt:/var/lib/letsencrypt' \
certbot/certbot certonly -d '*.myDomain.com' --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
#define ffor(i, x) for (int (i)=0;(i)<(x);(i)++) | |
#define fffor(i, x) for (int (i)=1;(i)<=(x);(i)++) | |
#define I(x) int (x); cin >> (x) | |
#define P(x) cout << (x) << '\n' | |
#define ll long long | |
#define ii pair<int, int> | |
#define fforR(x, i) for (int (i) = (x) - 1 ; (i) >= 0 ; --(i)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# original article: [How To Add Swap Space on Ubuntu 16.04](https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04) | |
# Cautious! Upgrading RAM is safer than this job. | |
# 1. check status | |
sudo swapon --show # no output == no available swap space | |
free -h # another way to do right above line | |
df -h # check available disk | |
# 2. create/enable swap file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for example, | |
# plugins=(git) | |
# will become : | |
# plugins=(git zsh-autosuggestions) | |
# with "addPlugin zsh-autosuggestions" | |
# add below function to ~/.zsrc, then reload with 'source ~/.zshrc' | |
addPlugin() { l=`cat ~/.zshrc | |
| grep -n '^plugins=.*$' | |
| cut -f1 -d:`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
npx express-generator -e -v ejs -c sass -f --git . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import csv | |
import os | |
import smtplib | |
from email.mime.text import MIMEText | |
import datetime | |
def sendGmail(userEmail, emailPassword, emailToBeSend, subject, htmlContent): | |
''' | |
Keep secret the PASSWORD ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Using Chrome, open a github page of remote repo on current directory. | |
# tested on MacOS | |
REMOTE=$(git remote -v | sed -n '1,1p' | sed 's/.*https/https/' | sed 's/\ .*//') | |
open -a Google\ Chrome $REMOTE | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo $PATH | tr : \\n | xargs -n1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"env": { | |
"browser": true, | |
"es2020": true | |
}, | |
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended"], | |
"parser": "@typescript-eslint/parser", | |
"parserOptions": { | |
"ecmaFeatures": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -Eeuxo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
사용법: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
OlderNewer