Skip to content

Instantly share code, notes, and snippets.

@fffx
fffx / 1-sekiro.md
Last active April 20, 2024 08:22
backup Sekiro save file in steam deck with bash-shortcuts
  1. Install decky-loader and bash-shortcuts
  2. Go to desk mode, you may need Anydesk
  3. Put the bash-shortcuts.json to the path $HOME/homebrew/settings/bash-shortcuts/bash-shortcuts.json

And from now on, you can backup Sekiro progress without switching to deskmode!

image

@fffx
fffx / readme.md
Created July 20, 2023 21:01
Install nerdfont for Lazyvim
@fffx
fffx / analyzer.rb
Last active March 22, 2024 12:04
blurhash rails-7 with libvips
class BlurhashAnalyzer < ActiveStorage::Analyzer::ImageAnalyzer::Vips
def metadata
read_image do |image|
if rotated_image?(image)
{ width: image.height, height: image.width }
else
{ width: image.width, height: image.height }
end.merge blurhash(image)
end
end
@fffx
fffx / .cloud-init.yml
Created March 18, 2022 13:35
multipass notes
ssh_authorized_keys:
- < your public key here>
@fffx
fffx / main.yml
Created March 18, 2022 08:24
Ansible run multiple task in parallel
- name: Clone repositories
git: repo={{item.repo}} dest={{item.dest}} depth=1
loop:
- {repo: "{{git_server}}/project1.git", dest: "some where" }
- {repo: "{{git_server}}/project2.git", dest: "some where else" }
register: clone_result
async: 600
poll: 0
# - debug: var=clone_result
- name: Check on an async task
@fffx
fffx / aria2.conf
Created January 5, 2022 06:08 — forked from qzm/aria2.conf
Best aria2 Config
### Basic ###
# The directory to store the downloaded file.
dir=${HOME}/Downloads
# Downloads the URIs listed in FILE.
input-file=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to FILE on exit.
save-session=${HOME}/.aria2/aria2.session
# Save error/unfinished downloads to a file specified by --save-session option every SEC seconds. If 0 is given, file will be saved only when aria2 exits. Default: 0
save-session-interval=60
# Set the maximum number of parallel downloads for every queue item. See also the --split option. Default: 5
@fffx
fffx / fix_minidlna.md
Created August 22, 2021 04:21
Fix MiniDLNA not scan new files

First make sure in /etc/minidlna.conf

inotify=true

check /var/log/minidlna.log may found

[2021/08/22 04:14:10] monitor.c:216: warn: WARNING: Inotify max_user_watches [8192] is low or close to the number of used watches [30] and I do not have permission to increase this limit.  Please do so manually by writing a higher value into /proc/sys/fs/inotify/max_user_watches
@fffx
fffx / backup.sh
Created July 4, 2021 04:38
openwrt auto backup 自动备份
#!/usr/bin/env bash
## usage
# chmod +x ./backup.sh
# add it to your crontab
set -u
filepath=/tmp/${HOSTNAME}-$(date +%F)-backup.tar.gz
umask go=
/sbin/sysupgrade -b $filepath
@fffx
fffx / xiami-tv.md
Created June 13, 2021 04:34
小米电视 卸载内置软件
  1. 设置 -> 关于 -> 产品型号, 点确认直到提示开启开发者模式
  2. 设置 -> 账号与安全 -> ADB调试

在这里下载adb tools, 并加入path

在 电视 关于 -> 网络信息找到电视ip地址, 我的是 192.168.31.122

在电脑上,

adb connect 192.168.31.122
@fffx
fffx / gist:1f8271b2ac6dbc60a10945ae1833e4b7
Last active April 3, 2021 14:15
Forbidden/block evernote redirect to chinese version yinxiang
# in ublock block -> my filter
||evernote.com/js/homepage-refresh-*.js
||evernote.com/js/compare-plans-refresh-*.js
||evernote.com/js/why-evernote-*.js