Skip to content

Instantly share code, notes, and snippets.

View gdouzwt's full-sized avatar
💬
I may be slow to respond.

zwt gdouzwt

💬
I may be slow to respond.
View GitHub Profile
@gdouzwt
gdouzwt / certbot-scripts
Created October 21, 2024 07:05
certbot 申请 ssl 证书
sudo certbot certonly \
--dns-cloudflare \
--dns-cloudflare-credentials ~/.secrets/certbot/cloudflare.ini \
-d esxi.zwt.io
@gdouzwt
gdouzwt / base64url
Created June 9, 2022 09:07
java-hex-string-to=base64url
new String(Base64.getUrlEncoder().withoutPadding().encodeToString(HexFormat.of().parseHex("6AA2FE5A95CC61A508CBCFAF96158AA2")))
@gdouzwt
gdouzwt / aacToMp4
Created April 19, 2022 15:41
accToMp4
MP4Box -add input.aac#audio output.m4a
@gdouzwt
gdouzwt / gen_tiles_modifed.sh
Created April 10, 2022 17:22
生成播放器进度条预览用到的精灵图
#!/bin/bash
#
# Copyright (c) 2019-2020 Roku, Inc. All rights reserved.
#
# References:
# https://stackoverflow.com/questions/2853334/glueing-tile-images-together-using-imagemagicks-montage-command-without-resizin
# http://www.imagemagick.org/script/command-line-options.php#append
# https://github.com/image-media-playlist/spec/blob/master/image_media_playlist_v0_4.pdf
# https://www.tecmint.com/install-imagemagick-in-linux/
# https://stackoverflow.com/questions/39504522/create-blank-image-in-imagemagick
nohup .sdks/webhook-linux-amd64/webhook -hooks hooks.json -verbose &
#!/usr/bin/env bash
set -e
if [ ! $1 ]; then
echo "参数为空,请输入版本号! 用法: deploy 版本号"
else
cd /home/developer/toDeploy
@gdouzwt
gdouzwt / stop.sh
Created March 4, 2022 13:08
stop-spring-boot
#!/bin/sh
kill -9 $( cat /data/cockpit/cockpit.pid)
@gdouzwt
gdouzwt / start.sh
Created March 4, 2022 13:07
spring-boot-start-up
#!/bin/bash
#nohup java -jar cockpit.jar -server -Xms2048m -Xmx4096m --spring.profiles.active=pre_yx >> /data/out.log 2>&1 &
nohup java -jar cockpit.jar -server -Xms2048m -Xmx4096m --spring.profiles.active=pre_yx >> /data/temp.log 2>&1 &
echo $! > /data/cockpit/cockpit.pid
@gdouzwt
gdouzwt / mysqldump
Created March 4, 2022 13:07
mysqldump
mysqlpump -uroot -p --single-transaction --default-parallelism=16 --set-gtid-purged=OFF --hex-blob -databases cs_microservice_vehicles > cs_microservice_vehicles.sql
ffmpeg -re -i Java-Concurrency-and-Multithreading.mp4 -map 0 -map 0 -c:a aac -c:v libx264 -b:v:0 800k -b:v:1 300k -s:v:1 320x180 -profile:v:1 baseline -profile:v:0 main -bf 1 -keyint_min 120 -g 120 -sc_threshold 0 -b_strategy 0 -ar:a:1 22050 -use_timeline 1 -use_template 1 -window_size 5 -adaptation_sets "id=0,streams=v id=1,streams=a" -f dash java/thread.mpd
@gdouzwt
gdouzwt / Linux-tar-usage.txt
Created May 15, 2021 01:10
Linux下把文件夹压缩成tar.gz的命令
解压 tar zxvf 文件名.tar.gz
压缩 tar zcvf 文件名.tar.gz 待压缩的文件名