Skip to content

Instantly share code, notes, and snippets.

@yydcool
yydcool / immich-job-daemon.py
Created March 31, 2024 00:01
A immich-job daemon script to set only one job queue active, global concurrency = 1
import requests,json,time
url = "http://127.0.0.1:2283/api/jobs"
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'x-api-key': Go 'Account Settings' -> 'API Keys'
}
./ffmpeg -h encoder=libsvt_hevc  ✔ 1m 29s 08:17:41
ffmpeg version git-2020-03-06-97b0f44 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9 (Debian 9.2.1-17)
configuration: --enable-libsvthevc --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --enable-gpl --enable-libx265 --enable-libx264 --enable-openssl --enable-libopus --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
libavutil 56. 42.100 / 56. 42.100
libavcodec 58. 73.102 / 58. 73.102
libavformat 58. 39.101 / 58. 39.101
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 77.100 / 7. 77.100
libswscale 5. 6.100 / 5. 6.100
@yydcool
yydcool / gist:e5738b2740b3b568aa8498d8a9e17dfa
Created March 5, 2020 14:48
ffmpeg -h encoder=libsvt_av1
./ffmpeg -h encoder=libsvt_av1  ✔ 09:34:47
ffmpeg version git-2020-02-27-516e9b9 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9 (Debian 9.2.1-16)
configuration: --enable-libsvtav1
libavutil 56. 42.100 / 56. 42.100
libavcodec 58. 73.102 / 58. 73.102
libavformat 58. 39.101 / 58. 39.101
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 77.100 / 7. 77.100
libswscale 5. 6.100 / 5. 6.100
@yydcool
yydcool / motion_detect.py
Created January 31, 2019 15:56
motion detect on Raspberry
from gpiozero import MotionSensor, LED
from signal import pause
import time,os
pir = MotionSensor(4)
is_on = 0
def on_motion():
global is_on
is_on = 1
print("motion")
@yydcool
yydcool / imwheel.sh
Last active January 1, 2023 08:51
imwheel
#!/bin/bash
# Version 0.1 Tuesday, 07 May 2013
# Comments and complaints http://www.nicknorton.net
# GUI for mouse wheel speed using imwheel in Gnome
# imwheel needs to be installed for this script to work
# sudo apt-get install imwheel
# Pretty much hard wired to only use a mouse with
# left, right and wheel in the middle.
# If you have a mouse with complications or special needs,
# use the command xev to find what your wheel does.
@yydcool
yydcool / Command_Prompt.reg
Created August 8, 2018 07:49
Windows: “Open with Powershell” and “Open with Command Prompt” when shift-rightclicking in Explorer
Windows Registry Editor Version 5.00
; Command Prompt
[HKEY_CLASSES_ROOT\Directory\shell\01MenuCmd]
"MUIVerb"="Command Prompts"
"Icon"="cmd.exe"
"ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuCmd"
[HKEY_CLASSES_ROOT\Directory\background\shell\01MenuCmd]
@yydcool
yydcool / golang1.10_on_rpi.md
Last active March 20, 2018 16:42
install golang 1.10 on Raspberry pi

To install golang 1.10 (or whatever the latest version is at the time anyone is reading this):

wget https://storage.googleapis.com/golang/go1.10.linux-armv6l.tar.gz
sudo tar -C /usr/local -xvf go1.10.linux-armv6l.tar.gz
cat >> ~/.bashrc << 'EOF'
export GOPATH=$HOME/go
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
EOF
source ~/.bashrc
#-*- coding=utf-8 -*-
"""
知乎图片下载器
"""
import requests
import re
import json
import time
from PIL import Image
import cStringIO