Skip to content

Instantly share code, notes, and snippets.

View jjm2473's full-sized avatar

Liangbin Lian jjm2473

  • Home
  • Shenzhen,CN
View GitHub Profile
@jjm2473
jjm2473 / check_dhcp_server.sh
Last active November 7, 2024 07:40
openwrt scripts
#!/bin/sh
if [ -z "$1" ]; then
echo "Specify a interface to check!" >&2
exit 1
fi
udhcpc -n -q -s /bin/true -t 1 -i "$1" && echo "Found DHCP server on $1"
@jjm2473
jjm2473 / rkbl.sh
Created November 1, 2024 10:05
Rockchip platform bootloader backup and restore
#!/bin/sh
STORAGE_OFFSET=64
BACKUP_BLOCKS=32704
save_bl() {
local storage="$1"
local backup="$2"
[ -b "$storage" -o -s "$storage" ] || {
echo "Src $storage is not a block device or is empty!" >&2
@jjm2473
jjm2473 / ffmpeg-wrapper
Created November 22, 2021 15:25 — forked from BenjaminPoncet/ffmpeg-wrapper
Synology VideoStation ffmpeg wrapper with DTS, EAC3 and TrueHD support (Installation instructions in 1st comment)
#!/bin/bash
rev="12"
_log(){
echo "$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - $1" >> /tmp/ffmpeg.log
}
_log_para(){
echo "$1" | fold -w 120 | sed "s/^.*$/$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - = &/" >> /tmp/ffmpeg.log