Skip to content

Instantly share code, notes, and snippets.

@15cm
15cm / ueberzugpp_scale.patch
Last active October 22, 2023 09:05
Yazi ueberzugpp scale patch
diff --git a/adaptor/src/ueberzug.rs b/adaptor/src/ueberzug.rs
index 27d891b..24f5e31 100644
--- a/adaptor/src/ueberzug.rs
+++ b/adaptor/src/ueberzug.rs
@@ -47,10 +47,10 @@ impl Ueberzug {
if let Some((path, rect)) = cmd {
let s = format!(
r#"{{"action":"add","identifier":"yazi","x":{},"y":{},"max_width":{},"max_height":{},"path":"{}"}}{}"#,
- rect.x,
- rect.y,
@15cm
15cm / bangumi-subscription.json
Last active September 30, 2021 13:06
Huginn Scenarios
{
"schema_version": 1,
"name": "Bangumi Subscription",
"description": "No description provided",
"source_url": false,
"guid": "6ac1d031153228f8a40df16e765e87ec",
"tag_fg_color": "#ffffff",
"tag_bg_color": "#f2a1b6",
"icon": "film",
"exported_at": "2021-01-17T03:44:39Z",
@15cm
15cm / init.el
Last active April 13, 2018 19:55
Add space after line number(relative mode) for terminal emacs
(defun my-linum-mode-hook (&rest r)
;; linum-relative-format should be first set as a custom variable
(setq linum-relative-format (if (display-graphic-p) "%4s" "%4s ")))
(my-linum-mode-hook)
;; fix reset problem of linum-relative-format
(advice-add 'spacemacs/cycle-spacemacs-theme :after #'my-linum-mode-hook)
@15cm
15cm / compinit-oh-my-zsh.zsh
Last active November 1, 2021 15:01 — forked from ctechols/compinit.zsh
Speed up zsh compinit by only checking cache once a day.
# compinit optimization for oh-my-zsh
# On slow systems, checking the cached .zcompdump file to see if it must be
# regenerated adds a noticable delay to zsh startup. This little hack restricts
# it to once a day. It should be pasted into your own completion file.
#
# The globbing is a little complicated here:
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct.
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error)
# - '.' matches "regular files"
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours.
@15cm
15cm / ddns-start.sh
Last active February 18, 2018 04:38 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 Dynamic DNS Update in sh(For ASUS Merlin)
#!/bin/bash
# https://github.com/RMerl/asuswrt-merlin/wiki/Custom-DDNS
# CHANGE THESE
auth_email="user@example.com"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_names="*.a.example.com"
record_names="$record_names a.example.com"
@15cm
15cm / huginn-bgm-subscribe.py
Last active January 29, 2023 02:28
Huginn agents generator for bangumi subscription
#!/usr/bin/env python3
# Redirect output to *.json and upload it as a "Scenario JSON File" in huginn
# You need to add sources in agent "Send url of data to Aria2 on VPS" manually
from datetime import datetime
import uuid
import json
# Set Aria2 Config here for Aria2 RPC

Keybase proof

I hereby claim:

  • I am 15cm on github.
  • I am sinkerine (https://keybase.io/sinkerine) on keybase.
  • I have a public key ASBA8k82BEoiTK1PDZlObIV4KsR9qbUUtXJJxIsjS2WNPwo

To claim this, I am signing this object:

@15cm
15cm / surfingkeyrc
Last active December 30, 2015 14:33
surfingkeyrc
// page browsing
unmap('E'); mapkey('H', 'Go one tab left', 'RUNTIME("previousTab")');
unmap('R'); mapkey('L', 'Go one tab right', 'RUNTIME("nextTab")');
unmap('S'); mapkey('J', 'Go back in history', 'history.go(-1)');
unmap('D'); mapkey('K', 'Go forward in history', 'history.go(1)');
unmap('u'); mapkey('u', 'Scroll a page up', 'Normal.scroll("pageUp")');
unmap('r'); mapkey('R', 'Reload the page', 'RUNTIME("reloadTab", { nocache: false })');