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/sh | |
set -uex | |
readonly GEO_DATA_PATH=/usr/local/share/v2ray | |
if [ -z ${GITHUB_TOKEN:-} ]; then | |
echo "env: GITHUB_TOKEN is empty." >&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
from argparse import ArgumentParser, Namespace | |
from functools import partial | |
from inspect import Parameter, signature | |
from typing import Callable | |
class Cli: | |
class Arg: | |
def __init__(self, *args, **kwargs) -> None: | |
self.args = 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
-------------------------------------------------------- | |
newflasher.exe v49 by Munjeni @ 2017/2020 | |
-------------------------------------------------------- | |
Determining available free space by GetDiskFreeSpaceEx: | |
Available space to caller = 40092 MB | |
Total space on current drive = 102401 MB | |
Free space on drive = 40092 MB |
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 bash | |
set -ueo pipefail | |
get_cover_index() { | |
input_file="${1}" | |
ffprobe -i "${input_file}" \ | |
-loglevel -8 \ | |
-show_streams \ | |
-of json | jq '.streams[] | select(.disposition.attached_pic==1) | .index' | |
} |
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 -o errexit | |
set -o pipefail | |
set -o nounset | |
OPENSSL=${OPENSSL:-$(which openssl)} | |
help() { | |
printf "$0 -h\n\tShow help.\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
# install archlinux on XPS 13 | |
# change root password in archiso | |
passwd | |
# enable wifi if need | |
wifi-menu | |
# get ip address | |
ip addr |
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 | |
PYTHON=python.exe | |
SCRIPT=${1:-'C:\Users\chigusa\AppData\Local\Programs\VapourSynth\vsrepo\vsrepo.py'} | |
WIN_PACKAGE_JSON="$($PYTHON "$SCRIPT" paths | grep Definitions | awk '{print $2}' | tr -d '\r\n')" | |
PACKAGE_JSON="$(wslpath "$WIN_PACKAGE_JSON" | awk '{$1=$1;print}')" | |
oldifs=$IFS | |
IFS=$'\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
#!/usr/bin/env python | |
import os | |
import zipfile | |
from argparse import ArgumentParser | |
class ZipFile(zipfile.ZipFile): | |
def __init__(self, *args, charset=None, **kwargs): | |
super().__init__(*args, **kwargs) | |
self.from_charset = 'cp437' |
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 -o errexit | |
set -o pipefail | |
set -o nounset | |
_date() { | |
LANG=us_EN.UTF-8 TZ=GMT date '+%a, %d %b %Y %H:%M:%S %Z' | |
} |
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 -o errexit | |
set -o nounset | |
set -o pipefail | |
_main() { | |
path=$1 | |
for file in $(find $path -name '*.flv' -cmin +1); do | |
if [[ $(wc -c "${file}" | awk '{print $1}') -lt $(expr 10 '*' 1024 '*' 1024) ]]; then |