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
#!/usr/bin/env python3 | |
""" | |
向百度提交sitemap的脚本 | |
详细使用方法请参考: https://knktc.com/2022/02/27/submit-baidu-sitemap-by-github-actions/ | |
@author:knktc | |
@contact:me@knktc.com | |
@create:2022-02-12 22:49 |
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
#!/usr/bin/env python3 | |
""" | |
A simple script to Bulk disable Confluence users with Selenium | |
Tested with Confluence 7.11.0 and Chrome 88 | |
@author:knktc | |
@contact:me@knktc.com | |
@create:2021-02-16 09:12 | |
""" |
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
""" | |
@author:knktc | |
@contact:me@knktc.com | |
""" | |
import os | |
import sys | |
import argparse | |
from django.core.management.base import BaseCommand |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# generate code details with path and code lines count | |
# usage: python code_lines_counter.py FULL_PATH_TO_YOUR_CODE | |
""" | |
@author:knktc | |
@contact:me@knktc.com | |
@create:2018-04-22 18:00 | |
""" |
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 | |
REDASH_TARBALL=/tmp/redash.0.4.0.b522.tar.gz | |
VERSION_DIR=/opt/redash/redash.0.4.0.b522.tar.gz | |
REDASH_BASE_PATH=/opt/redash | |
sudo apt-get update | |
sudo apt-get install -y python-pip redis-server postgresql postgresql-server-dev-9.3 python-dev nginx curl | |
wget https://github.com/EverythingMe/redash/releases/download/v0.4.0%2Bb522/redash.0.4.0.b522.tar.gz -O $REDASH_TARBALL | |
sudo adduser --system --no-create-home --disabled-login --gecos "" redash |
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
description "re:dash updater" | |
chdir /opt/redash/current | |
setuid redash | |
kill signal TERM | |
respawn | |
respawn limit 10 5 | |
start on started network-services |