This file contains 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
isort_run: | |
deps: [ ensure_venv ] | |
dotenv: | |
- .env | |
shell: bash | |
vars: | |
CHECK_FLAG: | |
sh: check_flag="--check"; if [ '{{.APPLY_FIX}}' == 'true' ]; then check_flag=""; fi; echo $check_flag | |
cmds: | |
- for: { var: TARGET, as: FILE } |
This file contains 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
tc qdisc list | |
tc qdisc add dev lo root netem delay 0.1ms | |
tc qdisc change dev lo root netem delay 0.3ms | |
tc qdisc change dev lo root netem delay 0.1ms |
This file contains 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
pre-commit run --files `git diff --name-only HEAD~ | tr '\r\n' ' '` |
This file contains 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
import logging | |
logging.basicConfig( | |
level=logging.INFO, | |
format= '[%(asctime)s] {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s', | |
datefmt='%H:%M:%S' | |
) | |
log = logging.getLogger(__name__) | |
log.info("Logger initiated") |
This file contains 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
DO $$ DECLARE | |
tabname RECORD; | |
BEGIN | |
FOR tabname IN (SELECT tablename | |
FROM pg_tables | |
WHERE schemaname = current_schema()) | |
LOOP | |
EXECUTE 'DROP TABLE IF EXISTS ' || quote_ident(tabname.tablename) || ' CASCADE'; | |
END LOOP; | |
END $$; |
This file contains 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 | |
set -e | |
while [[ `pg_isready &>/dev/null && echo "1"` -ne "1" ]]; do | |
sleep 1; | |
echo "pg is not ready"; | |
done | |
echo "pg is ready"; |
This file contains 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 i in */.git; do ( echo $i; cd $i/..; git pull; ); done |
This file contains 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
from subprocess import check_output | |
host_ip = check_output("/sbin/ip route|awk '/default/ { print $3 }'", shell=True).decode().strip() |
This file contains 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
root@85ba14b2a8ab:/opt/pow# echo $PYTHONPATH | |
/opt/pow:/opt/pow/csn:/opt/pow/zozzymodels:/opt/pow/libs: | |
root@85ba14b2a8ab:/opt/pow# echo $DJANGO_SETTINGS_MODULE | |
'csn.settingsdocker' | |
root@85ba14b2a8ab:/opt/pow# ls -laht /opt/pow/csn/settingsdocker.py | |
-rw-rw-r-- 1 root root 1.2K Jun 3 13:38 /opt/pow/csn/settingsdocker.py | |
root@85ba14b2a8ab:/opt/pow# django-admin | |
Traceback (most recent call last): | |
File "/usr/local/bin/django-admin", line 11, in <module> | |
sys.exit(execute_from_command_line()) |
This file contains 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
Root/Video Games & Consoles/Video Game Consoles [Video Game Consoles]: | |
-> Root/Video Games/Categories/Xbox 360/Consoles[score 52.9318181818182] | |
Root/Sporting Goods/Indoor Games/Billiards/Tables [Tables]: | |
-> Root/Sports & Outdoors/Categories/Sports & Fitness/Leisure Sports & Game Room/Billiards & Pool/Tables & Accessories/Tables[score 59.9232954545455] | |
-> Root/Toys & Games/Categories/Games/Game Room Games[score 26.72] | |
-> Root/Toys & Games/Categories/Games/Game Room Games/Billiards[score 14.58125] | |
-> Root/Sports & Outdoors/Categories/Sports & Fitness/Leisure Sports & Game Room/Arcade & Table Games/Tabletop Billiards & Pool[score 8.74875] | |
Root/Sporting Goods/Cycling/Bicycle Components & Parts/Tires [Tires]: |
NewerOlder