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 | |
import platform | |
import sys | |
# logger config | |
LOG_LEVEL = logging.DEBUG | |
LOG_FORMAT = "\x1b[0;90m[%(asctime)s.%(msecs)03d] \x1b[0;90m(%(threadName)s) \x1b[1;37m%(levelname)s\x1b[0;90m: %(message)s" | |
LOG_DATE_FORMAT = "%Y-%m-%d %H:%M:%S" | |
LOG_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
#!/bin/bash | |
# Warning! /tmp is used to store the extracted file | |
TMP='/tmp/tar2zip/' | |
IFS=$(echo -en "\n\b") | |
if [ $# == 0 ] | |
then | |
set -- `ls *.{tar,gz,gz2,bz,bz2,Z} 2> /dev/null` | |
fi |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\Microsoft\InputMethod\Settings\CHS] | |
"UserDefinedDoublePinyinScheme0"="Fly*2*^*iuvdjhcwfg^xmlnpbksqszxkrltvyovt" |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem] | |
"RefsDisableLastAccessUpdate"=dword:00000001 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MiniNT] | |
"AllowRefsFormatOverNonmirrorVolume"=dword:00000001 |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation] | |
"RealTimeIsUniversal"=dword:00000001 |
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 | |
# This script converts and changes the Jetbrains app icons to png in order to fix missing icon in the Application laucher of KDE Plasma | |
IFS=$(echo -en "\n\b") | |
DESKTOP=~/.local/share/applications/jetbrains-*.desktop | |
if ! [ -x "$(command -v convert)" ]; then | |
echo 'Error: ImageMagick is not installed. ' >&2 | |
exit 1 | |
fi |
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 argparse | |
import re | |
#https://github.com/first20hours/google-10000-english/blob/master/google-10000-english.txt | |
dictionary = "google-10000-english.txt" | |
parser = argparse.ArgumentParser(description='Find all words with specific letters') | |
parser.add_argument('letters', metavar='L', type=str, nargs='+', | |
help='array of letters like \'A\' \'B\' \'C2\', the number after letter limit the occurrence') | |
args = parser.parse_args() |
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 | |
# https://github.com/obskyr/khinsider | |
# csv format | |
# "album forder name", "album-id", " ext1,ext2" | |
# example | |
# "Dance Dance Revolution - Disney Eurobeat - Disc 1","dance-dance-revolution-disney-eurobeat-disc-1","flac" | |
# "Dance Dance Revolution - Disney Eurobeat - Disc 2","dance-dance-revolution-disney-eurobeat-disc-2","mp3" |
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
<!-- | |
Example config for Nginx: | |
server { | |
# ... | |
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 420 422 423 424 426 428 429 431 444 449 450 451 500 501 502 503 504 505 506 507 508 509 510 511 /error.html; | |
location /error.html { | |
ssi on; | |
internal; | |
auth_basic off; |
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 | |
# unmount zpool and issue sleep command to HDDs | |
if [[ $EUID > 0 ]]; then | |
echo "ERROR: Please run as root" | |
exit 1 | |
fi | |
if ! [ -x "$(command -v hdparm)" ]; then |
OlderNewer