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 random | |
# ____ _____ ____ __ __ ______ ____ ____ | |
# /\ _`\ /\ __`\/\ _`\ /\ \/\ \/\__ _\/\ _`\ /\ _`\ | |
# \ \ \L\ \ \ \/\ \ \ \L\_\ \ `\\ \/_/\ \/\ \,\L\_\ \,\L\_\ | |
# \ \ , /\ \ \ \ \ \ _\L\ \ , ` \ \ \ \ \/_\__ \\/_\__ \ | |
# \ \ \\ \\ \ \_\ \ \ \L\ \ \ \`\ \ \_\ \__/\ \L\ \/\ \L\ \ | |
# \ \_\ \_\ \_____\ \____/\ \_\ \_\/\_____\ `\____\ `\____\ | |
# \/_/\/ /\/_____/\/___/ \/_/\/_/\/_____/\/_____/\/_____/ 2021.11.15 |
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 sh | |
dk build -t tmp --no-cache --progress=plain . |
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...] |
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
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
#!/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
# -*- 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 | |
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
# 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
# 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 |