Skip to content

Instantly share code, notes, and snippets.

@douo
douo / README.org
Created January 2, 2024 13:55
Journald Telegram Notifier
@douo
douo / README.org
Last active July 6, 2023 06:52
Emacs (no-x) as kitty scrollback_pager

Test on:

  • Linux
  • macOS

Linux dependencies:

  • xsel

~/.local/bin/kitty_emacs_pager

@douo
douo / README.org
Last active June 11, 2023 12:22
Inoreader to Miniflux/v2

Backup

Preferences -> API access

复制 App ID 和 App Key 填入 backup.py 的 client_idclient_secret

rye pin 3.11
rye add requests
rye sync
@douo
douo / README.md
Created February 2, 2023 11:55
Cloudflare DDNS for IPv6 GUA
@douo
douo / douo.zsh-theme
Created December 30, 2020 03:20
My Oh-My-Zsh Theme
PROMPT="$fg[cyan]%}$USER@%{$fg[green]%}%m "
PROMPT+="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
package info.dourok.androidx.databinding
import androidx.databinding.ViewDataBinding
import androidx.lifecycle.GenericLifecycleObserver
import androidx.lifecycle.Lifecycle.Event.ON_START
import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.LifecycleOwner
import java.lang.ref.WeakReference
import java.util.WeakHashMap

Keybase proof

I hereby claim:

  • I am douo on github.
  • I am douo (https://keybase.io/douo) on keybase.
  • I have a public key ASAQODR5d3WbIv6rb_fA0x5ThgafJdlcrttE9jV8HKu9KQo

To claim this, I am signing this object:

Classfile ./com/company/LambdaTest.class
Last modified 2017-10-11; size 1296 bytes
MD5 checksum 7ac0bf40633d31a57673577fde0a699d
Compiled from "LambdaTest.java"
public class com.company.LambdaTest
minor version: 0
major version: 52
flags: ACC_PUBLIC, ACC_SUPER
Constant pool:
#1 = Methodref #8.#25 // java/lang/Object."<init>":()V
@douo
douo / capitalizeWord.groovy
Created August 19, 2016 15:59
IntelliJ LivePlugin script:将当前单词或下一个单词转换为首字母大写
import com.intellij.openapi.actionSystem.AnActionEvent
import static liveplugin.PluginUtil.*
/**
* 将当前单词或下一个单词转换为首字母大写
*/
registerAction("Capitalize Word", "alt C") { AnActionEvent event ->
runDocumentWriteAction(event.project) {
currentEditorIn(event.project).with {
@douo
douo / HierarchyFragmentPagerAdapter.java
Created July 26, 2016 14:11
可嵌套使用的 FragmentPagerAdapter 主要修复 FragmentPagerAdapter 处理 {@link Fragment#setMenuVisibility(boolean)} 的 bug
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software