Skip to content

Instantly share code, notes, and snippets.

@zeroxia
zeroxia / CMakeLists.txt
Last active May 10, 2022 15:29
Protobuf from *.proto to *.pb.cc and *.pb.h and library
####
#### NOTE: This is not verified.
####
cmake_minimum_required(VERSION 3.12)
project(proto_lib)
#set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_BINARY_DIR})
set(PROTO_ROOT_DIR ${CMAKE_SOURCE_DIR})
@zeroxia
zeroxia / exosphere.ini
Created May 1, 2022 07:45
Switch "exosphere.ini" to blank product info (Serial Number) in system and/or emulated MMC - 2022/05/01
# Key: debugmode, default: 1.
# Desc: Controls whether kernel is debug mode.
# Disabling this may break Atmosphere's debugger in a future release.
# Key: debugmode_user, default: 0.
# Desc: Controls whether userland is debug mode.
# Key: disable_user_exception_handlers, default: 0.
# Desc: Controls whether user exception handlers are executed on error.
# NOTE: This will cause atmosphere to not fail gracefully.
@zeroxia
zeroxia / tmux_build_static.md
Created April 30, 2022 14:43
Build tmux with static linking
@zeroxia
zeroxia / 2022groceries.md
Created April 17, 2022 06:38
Shared from CCF - 2022/04/17
项目名称 作者 git地址 语言 运行环境 适用平台 实现原理 备注
dingdong-helper JannsenYang https://github.com/JannsenYang/dingdong-helper java PC 叮咚 跑接口 需截包获取个人信息并进行配置
ddmc LovelyWhite https://github.com/LovelyWhite/ddmc java PC 叮咚 跑接口 需截包获取个人信息并进行配置
DingDongHelper xiaoruil6888 https://github.com/xiaorui16888/DingDongHelper java PC 叮咚 跑接口 需截包获取个人信息,含运力监控,教程极其详细
ddshop zc2638 https://github.com/zc2638/ddshop go PC 叮咚 跑接口 需截包获取cookie
DDFoodHook langzishen https://github.com/langzishen/DDFoodHook go PC 叮咚 跑接口 需截包获取个人信息并进行配置
Vegetables wulu17 https://github.com/wulu17/Vegetables js PC/android 叮咚、美团、盒马 exe跑接口,autojs自动点击 zip中含有叮咚、美团、盒马脚本,可导入autojs
robFood sean529 https://github.com/sean529/robFood js android 叮咚 autojs自 动点击 公众号:一碗代码。回复:抢菜助手
Rob_greens pilgrimOO https://github.com/pilgrim00/Rob_greens js android 叮咚
@zeroxia
zeroxia / 01-initial-S.M.A.R.T.txt
Created March 16, 2022 15:21
Misfortune of a Seagate HDD: Seagate Desktop HDD.15 (ST5000DM000-1FK178)
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.34-1-pve] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Seagate Desktop HDD.15
Device Model: ST5000DM000-1FK178
Serial Number: W4J0BAVZ
LU WWN Device Id: 5 000c50 07d53b6c5
Firmware Version: CC46
User Capacity: 5,000,981,078,016 bytes [5.00 TB]
@zeroxia
zeroxia / call-subrename.bat
Last active March 12, 2018 13:11
Batch scripts on Windows, to rename subtitle files, for the drama Game of Thrones
@echo off
REM echo.ARG1: Video Directory, e.g., \\alarm\media\xiayitiao\download\Game.Of.Thrones.S01\
REM echo.ARG2: Season selection, e.g., S01
REM echo.ARG3: Subtitle directory, e.g., subs-1
REM echo.ARG4: Subtitle naming tag, e.g., zh-1
for %%i in (2 3) do (
call subrename.bat ^
"\\alarm\media\xiayitiao\download\HBO史诗巨著:冰与火之歌.权力的游戏.第六季全.2016.中英字幕£CMCT梦幻" ^
@zeroxia
zeroxia / fn_cksfv.sh
Created January 14, 2018 14:07
Check SFV and compare to the value extracted from respective filename
#!/bin/sh
for f in *.mkv; do
echo -n "$f"
checksum=$( echo "$f" | sed -e "s/^.*\[\([^][]\+\)\]\.mkv/\1/" )
#echo " Checksum: $checksum"
checksum_calc=$( cksfv "$f" | awk '/^[^;]/ { print $2; }' )
if [ "$checksum" == "$checksum_calc" ]; then
echo " - GOOD"
else
@zeroxia
zeroxia / visual_studio_2017_layout_commands.bat
Created January 14, 2018 14:05
Download Visual Studio 2017 installation files, for offline usage, using "vs_professional.exe" or "vs_community.exe" web installer
:: Managed Desktop download
vs_professional.exe --layout "%~dp0vs2017_layout_MD" ^
--add Microsoft.VisualStudio.Workload.ManagedDesktop ^
--lang en-US
:: Native Desktop download
vs_professional.exe --layout "%~dp0vs2017_layout_ND" ^
--add Microsoft.VisualStudio.Workload.NativeDesktop ^
--lang en-US
@zeroxia
zeroxia / linux-transmission.txt
Created November 10, 2017 14:53
Summary the setup of transmission-daemon on a Linux host
pacman -S transmission-cli
cd /var/lib/transmission/.config/transmission-daemon/
cp settings.json edit.txt
(EDIT edit.txt)
cat edit.txt >settings.json
cd /usr/share/transmission
git clone -o github 'https://github.com/ronggang/transmission-web-control.git'
cd /usr/share/transmission/web
mv index.html index.original.html