参考这个分享的curl上传方法编写的脚本,目的是简化 token 获取到上传文件的流程。
个人用在定时文件备份中。
#!/bin/bash
# 检查参数数量
if [ $# -ne 6 ]; then
echo "Usage: $0 --username <username> --password <password> <local-file> <alist-url>"
参考这个分享的curl上传方法编写的脚本,目的是简化 token 获取到上传文件的流程。
个人用在定时文件备份中。
#!/bin/bash
# 检查参数数量
if [ $# -ne 6 ]; then
echo "Usage: $0 --username <username> --password <password> <local-file> <alist-url>"
curl -o install https://raw.githubusercontent.com/gamextra4u/FEXDroid/main/install && chmod +x install && ./install
When login into proot, use ./rootfs
to download rootfs for FEX.
javascript:(async function() { | |
const token = "<your token>"; | |
const database = "<your database>"; | |
const url = 'https://corsproxy.io/?https://api.notion.com/v1/pages'; | |
const options = { | |
method: 'POST', | |
headers: { | |
Authorization: `Bearer ${token}`, | |
'content-type': 'application/json', |
function calculateXOR(str) { | |
let xorValue = 0; | |
for (let i = 0; i < str.length; i += 2) { | |
const hex = str.substr(i, 2); | |
const decimal = parseInt(hex, 16); | |
xorValue ^= decimal; | |
} | |
const xorHex = xorValue.toString(16).toUpperCase().padStart(2, '0'); | |
return xorHex; | |
} |
void print_hex(const unsigned char *buf, size_t len) { | |
for (size_t i = 0; i < len; i++) { | |
printf("%02x ", buf[i]); | |
} | |
printf("\n"); | |
} |
# $UBIFS is ubifs image file | |
# make sure $IMAGE is a ubifs image file | |
blkid $(IMAGE) | |
$(IMAGE): ... TYPE="ubifs" | |
# size of created mtd is 256.0 MiB | |
modprobe nandsim first_id_byte=0x2c second_id_byte=0xda third_id_byte=0x90 fourth_id_byte=0x95 | |
flash_erase /dev/mtd0 0 0 | |
ubiformat /dev/mtd0 | |
modprobe ubi |
# $UBIFS is ubifs image file | |
# make sure $IMAGE is a ubifs image file | |
blkid $(IMAGE) | |
$(IMAGE): ... TYPE="ubifs" | |
# size of created mtd is 256.0 MiB | |
modprobe nandsim first_id_byte=0x2c second_id_byte=0xda third_id_byte=0x90 fourth_id_byte=0x95 | |
flash_erase /dev/mtd0 0 0 | |
ubiformat /dev/mtd0 -s 2048 -O 2048 | |
modprobe ubi |
.a | |
.cache | |
.d | |
.dll | |
.o | |
.so | |
build |
const _ = require("lodash") | |
const fs = require("fs") | |
const map = {} | |
function readTemplate(path) { | |
if (!map[path]) { | |
const str = _(fs.readFileSync(path, "utf-8")) | |
.replace(/<%-/g, "TEMP<%-TEMP") | |
.replace(/<%=/g, "<%-") | |
.replace(/TEMP<%-TEMP/g, "<%=") |
# instruction name's sufiix mans data size | |
# q = 64-bits | |
# l = 32-bits | |
# w = 16-bits | |
# b = 8-bits | |
# row started with dot is a directive row | |
.data | |
x: .quad 0 | |
y: .word 0 | |
z: .double 123.125 |