This file contains hidden or 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 | |
| mkdir -p cache data | |
| function process_file() { | |
| file=cache/$1 | |
| dstfile=data/${1%.*}.json | |
| generated=$(date "+%s") | |
| sort $file | grep -v '^$' | uniq | jq -R 'if contains(":") then {prefix:.,asn:"0",maxLength:128} else {prefix:.,asn:"0",maxLength:32} end' | jq -sr "{meta:{generated:$generated},roas:.}" > $dstfile | |
| } |
This file contains hidden or 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 | |
| function checkcmd() { | |
| cmdpkg=$1 | |
| [ -z "$2" ] || cmdpkg="$1 (in $2)" | |
| command -v $1 > /dev/null || { echo "error: $cmdpkg is required"; exit 1; } | |
| } | |
| checkcmd jq | |
| checkcmd file |
This file contains hidden or 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 | |
| # for deepin 25.0.1 / deepin 23.1 | |
| LANG=C sed -i '0,/console=tty splash/s//persistence splash/' $1 | |
| truncate -s +8G $1 | |
| fdisk $1 <<<$'n\n\n\n\n\nw' | |
| LIVEDEV=$(sudo losetup -f -P --show $1) |
This file contains hidden or 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 | |
| import argparse | |
| import datetime | |
| import sys | |
| import time | |
| import threading | |
| import traceback | |
| import socketserver | |
| import struct |
This file contains hidden or 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 | |
| IMAGE_SEARCH=$(find ./Downloads/deepin-23-beige-preview-riscv64-*.iso | sort | tail -n1) | |
| IMAGE=${1:-$IMAGE_SEARCH} | |
| VCPU=16 | |
| VRAM=16G | |
| if [ ! -f ./test-disk.img ]; then |
This file contains hidden or 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 | |
| AUTHOR="eweOS Auto Package Update <[email protected]>" | |
| GH_TOKEN="GITHUB_TOKEN" | |
| PKG_NAME=$1 | |
| if [ -z "$PKG_NAME" ]; then | |
| echo "Error: no package name provided." | |
| exit 0 | |
| fi |
This file contains hidden or 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
| [DEFAULT] | |
| downstream = pacman | |
| [acl] | |
| url = https://download.savannah.gnu.org/releases/acl/ | |
| [aria2] | |
| url = https://github.com/aria2/aria2/tags | |
| regex_name = release |
This file contains hidden or 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 | |
| # docomo apps | |
| adb shell pm list packages | grep docom | cut -f 2 -d ':' | xargs -I @ adb shell pm disable-user --user 0 @ | |
| # swiftkey IME | |
| adb shell pm list packages | grep swiftkey | cut -f 2 -d ':' | xargs -I @ adb shell pm disable-user --user 0 @ | |
| # docomo contacts app | |
| adb shell pm disable-user --user 0 com.android.contacts |
This file contains hidden or 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 | |
| NODES=( | |
| "APR1.HK" | |
| "LON1.UK" | |
| "LAX1.US" | |
| "LAS1.US" | |
| "VUL1.SG" | |
| "NYC1.US" | |
| "TYO1.JP" | |
| "LL1.NL" |
This file contains hidden or 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/python3 | |
| import requests | |
| import json | |
| import hmac | |
| import hashlib | |
| import base64 | |
| import math | |
| import sys |
NewerOlder