From cbbde754a810388ed83cf6536baa67b1a7d970b9 Mon Sep 17 00:00:00 2001 From: Jaewook Lee <11328376+jaewooklee93@users.noreply.github.com> Date: Sun, 11 Aug 2024 14:01:10 +0900 Subject: [PATCH] bashrc: better git add --- linux-bash/bash_aliases.sh | 16 ++++++++++++++-- playwright/app.py | 15 +++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 playwright/app.py diff --git a/linux-bash/bash_aliases.sh b/linux-bash/bash_aliases.sh index 89207da..b5f7b4b 100644 --- a/linux-bash/bash_aliases.sh +++ b/linux-bash/bash_aliases.sh @@ -1,5 +1,6 @@ export RC="~/.bash_aliases" alias rc="vi $RC && tail $RC && source $HOME/.${SHELL##*/}rc" +alias bat="batcat --paging=never" alias my="sudo chown -R $(id -u):$(id -g)" @@ -47,6 +48,8 @@ diff() { if [[ $# -eq 0 ]]; then clear git status + echo + echo git diff --staged else diff -qr "$@" @@ -78,12 +81,19 @@ alias df="df -h" alias status="git status ." alias push="git push" alias pull="git pull" -alias add="git add" +add() { + if [ $# -eq 0 ]; then + git add . + else + git add $@ + fi + diff +} alias remote="git remote -v" alias stash="git stash" alias vimrc="vi ~/.vimrc" commit() { - git commit -m "$*" + git commit -m "$*" } git() { @@ -103,3 +113,5 @@ git() { alias cls="clear" alias weather="curl ko.wttr.in" + +alias dryblack="clear; black --check --diff --color ." diff --git a/playwright/app.py b/playwright/app.py new file mode 100644 index 0000000..812615b --- /dev/null +++ b/playwright/app.py @@ -0,0 +1,15 @@ +# pip install playwright && playwright install --with-deps + +import asyncio, threading, queue, io, pandas as pd +from playwright.async_api import async_playwright + +def GET(url, html = queue.Queue()): + async def aGET(P = async_playwright().start()): + html.put(await (await (await (await (await P) + .chromium.launch()).new_page()).goto(url)).text()) + threading.Thread(target=lambda: asyncio.run(aGET())).start() + return io.StringIO(html.get()) + +df = pd.read_html(GET('https://freeproxy.world/?type=socks5'))[0] +df = df.loc[df.Type == 'socks5'].reset_index(drop=True) +print(f'\x1b[92m{df}\x1b[0m')