Skip to content

Instantly share code, notes, and snippets.

View zenwalk's full-sized avatar
🏠
Working from home

chenn zenwalk

🏠
Working from home
View GitHub Profile
@zenwalk
zenwalk / For Mac 4.2.6 unlimited trial.md
Created January 22, 2024 16:47 — forked from rise-worlds/For Mac 4.2.6 unlimited trial.md
Beyond Compare 4 license for Windows, Mac, Linux

for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.

  1. open Terminal, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
  2. change the name BCompare to BCompare.bak: mv BCompare BCompare.bak
  3. touch a file name BCompare , and chmod a+ux BCompare : touch BCompare && chmod a+ux BCompare
  4. open BCompare with text editor, insert the script :
#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
@zenwalk
zenwalk / append-ssh-authorized_keys.sh
Created November 24, 2023 09:06 — forked from STRRL/append-ssh-authorized_keys.sh
append my ssh pub key as ssh authorized_keys
#!/usr/bin/env bash
mkdir -p ~/.ssh
# if authorized_keys not exist, create it
if [ ! -f ~/.ssh/authorized_keys ]; then
touch ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
fi
curl -L http://github.com/strrl.keys >> ~/.ssh/authorized_keys
# Attribute: userinfo-url={{print .subscribe_url}}
# Attribute: filename={{hostOf .subscribe_url}}.yaml
ipv6: true
mixed-port: 7890
mode: rule
allow-lan: true
log-level: info
external-controller: 127.0.0.1:6170
@zenwalk
zenwalk / .block
Created April 28, 2023 18:58 — forked from texodus/.block
Perspective / Movies
license: apache-2.0
height: 800
@zenwalk
zenwalk / ffmpeg-watermark.md
Created April 28, 2023 18:58 — forked from bennylope/ffmpeg-watermark.md
FFmpeg add a watermark to video

How to Add a Watermark to Video

FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.

Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:

ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4

Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.

@zenwalk
zenwalk / zmv-examples.md
Created April 28, 2023 18:58 — forked from niksmac/zmv-examples.md
ZMV-Examples (require autoload zmv)

rename a section of a filename, i. e. example.1.{txt,conf,db} or 12345.1.{wav,ogg,mp3} and

change the 1 to a 2 in the filename while preserving the rest of it.

$ zmv -n '(.)(<->)(.[^.]#)' '$1$(($2+1))$3' # would rename x.0001.y to x.2.y. $ zmv -n '(.0#)(<->)(.[^.]#)' '$1$(($2+1))$3'

Rename files to lower case

$ zmv '*' '${(L)f}'

serially all files (foo.foo > 1.foo, fnord.foo > 2.foo, ..)

$ autoload zmv

@zenwalk
zenwalk / advanced_rasterio_features.ipynb
Created April 28, 2023 18:58 — forked from sgillies/advanced_rasterio_features.ipynb
Advanced Rasterio features notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
阿爸 a1'ba4 18137
阿昌族 a1'chang1'zu2 50849
阿斗 a1'dou3 42632
阿飞 a1'fei1 48603
阿富汗 a1'fu4'han4 3461
阿訇 a1'hong1 34432
阿拉伯数字 a1'la1'bo2'shu4'zi4 35937
阿拉伯语 a1'la1'bo2'yu3 30476
阿妈 a1'ma1 16220
阿门 a1'men2 47913
@zenwalk
zenwalk / auto-renwal-subconver.sh
Created April 28, 2023 18:52 — forked from foru17/auto-renwal-subconver.sh
批量更新节点订阅脚本
#!/bin/bash
# 配合定时脚本使用
# 订阅后台接口,建议自己搭建,参考 https://github.com/tindy2013/subconverter
SERVER_API_URL="https://any.sub.domain/subconver"
# 输出的目录位置, nginx 解析目录
OUTPUT_FOLDER="/www/wwwroot/sub.domain.com"
# bark 推动提醒地址