Skip to content

Instantly share code, notes, and snippets.

Avatar
🏃‍♂️
💨💨💨💨

ian doitian

🏃‍♂️
💨💨💨💨
View GitHub Profile
View format-zotero.py
#!/usr/bin/env python3
import fileinput
import re
from dataclasses import dataclass, field
ANNOTATION_RE = re.compile(r"""
“(.*)”
(\ \(\[.*\]\(.*\)\))+
(?:\ (.*))?
View lychee.yml
name: lychee
on:
push:
branches:
- master
schedule:
- cron: '0 0 1 * *'
jobs:
@doitian
doitian / jasmine_config.rake
Created Apr 14, 2022
Load jasmine_config.rb in jasmine 1.3.1
View jasmine_config.rake
# lib/tasks/jasmine_config.rake
#
# Not work for rake jasmine:ci
namespace :jasmine do
task :config do
load Rails.root.join('spec/javascripts/support/jasmine_config.rb')
end
end
task "jasmine:require" => ["jasmine:config"]
View git-tmp
#!/bin/bash
set -e
ACTION="${1:-init}"
TMPDIR="$(cd "${TMPDIR:-/tmp}" && pwd)"
escape() {
sed 's;[\\/];%;g'
}
@doitian
doitian / ob-bookmarks.py
Last active Feb 9, 2022
A script to export Vivaldi bookmarks into markdown files.
View ob-bookmarks.py
#!/usr/bin/env python3
from pathlib import Path
import tempfile
import json
import textwrap
import hashlib
import os
import shutil
import filecmp
@doitian
doitian / endwise-compe-mappings.vim
Created Jul 26, 2021
tpope/vim-endwise + hrsh7th/nvim-compe
View endwise-compe-mappings.vim
let g:endwise_no_mappings = 1
inoremap <silent><expr> <CR> compe#confirm('<CR>')
inoremap <silent><expr> <A-/> compe#complete()
inoremap <silent><expr> <C-e> compe#close('<C-e>')
imap <silent><expr> <CR>
\ (pumvisible() ?
\ (complete_info()["selected"] == -1 ? "\<C-g>u\<CR>\<Plug>DiscretionaryEnd" : "\<C-y>")
\ : "\<CR>\<Plug>DiscretionaryEnd" )
View CKB toml parser test.md

┌ 在 [pow] 后面再加 [params]

启动失败

$ ./target/release/ckb run
2021-03-31 11:11:14.591 +08:00 main INFO sentry  sentry is disabled
redefinition of table `params` for key `params` at line 99 column 1
View doitian-2020.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@doitian
doitian / transmission-docker-compose.yaml
Last active Dec 7, 2020
[Transmission Docker Compose] #docker #qnap #nas
View transmission-docker-compose.yaml
---
version: "2.1"
services:
transmission:
image: linuxserver/transmission
container_name: transmission
environment:
- PUID=1000
- PGID=0
- TZ=Asia/Shanghai
@doitian
doitian / doc-todos.md
Last active Oct 29, 2020
CKB doc in comment assignments
View doc-todos.md

Mark missing docs then finish all the missing docs todos.

Total progress:

  • 2020-10-13: 2 / 2062
  • 2020-10-20: 320 / 2062

About Assignments: