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
import sys | |
import pathlib | |
import subprocess | |
for fn in pathlib.Path(sys.argv[1]).glob('*'): | |
ext = subprocess.getoutput(f'file --extension {fn}').split(' ')[-1].split('/')[0].split(',')[0] | |
assert ext.isalnum() | |
fn.rename(fn.with_suffix('.' + ext)) |
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
python3 test_split.py ../llvm-test-suite/Bitcode/simd_ops/ARM_tests/test_op_vsubw_u32_658.bc | |
total functions: 4 | |
before: | |
0 function(s): 1 module(s) | |
1 function(s): 2 module(s) | |
2 function(s): 1 module(s) | |
after: | |
1 function(s): 4 module(s) |
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 python | |
# 1. Modify the variables according to your setup: ssid, password, bssid, [email] | |
# 2. Connect the computer to AP-TechLife-xx-xx SSID | |
# 3. Run the script | |
import socket | |
# Variables to change | |
ssid = '**YOURSSID**' | |
password = '**WIFIPASSWORD**' | |
bssid = bytearray([0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa]) # Enter your WiFi router's WiFi interface MAC address in hex (eg. AA:AA:AA:AA:AA:AA) |
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/sh | |
wget https://downloads.openwrt.org/snapshots/targets/ramips/mt7621/openwrt-imagebuilder-ramips-mt7621.Linux-x86_64.tar.xz | |
tar -xvf openwrt-imagebuilder-ramips-mt7621.Linux-x86_64.tar.xz | |
cd openwrt-imagebuilder-ramips-mt7621.Linux-x86_64 | |
make image PROFILE=zbt-we1326 PACKAGES="luci \ | |
kmod-usb-net kmod-usb-net-cdc-ether kmod-usb-serial-qualcomm kmod-usb-net-qmi-wwan kmod-usb-net-rndis kmod-usb-wdm luci-proto-qmi uqmi \ | |
block-mount kmod-usb-storage kmod-usb3 usb-modeswitch usbutils fdisk \ | |
fstools f2fs-tools f2fsck kmod-fs-f2fs mkf2fs \ |
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/sh | |
make -j all zip | |
read -n1 -r -p "Press any key to continue" | |
echo | |
cd ../rbutil/ibassoboot/jni/ && $ANDROID_NDK_PATH/ndk-build | |
read -n1 -r -p "Press any key to continue" | |
echo | |
cd - |
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
import sys | |
from subprocess import call | |
TOOLS_PATH = './rk-tools/' | |
# optional steps: | |
# 1. download and compile rk-tools | |
# git clone https://github.com/rk3066/rk-tools.git | |
# cd rk-tools && make |