Skip to content

Instantly share code, notes, and snippets.

View y4code's full-sized avatar
😎
Being dalao

y4code y4code

😎
Being dalao
View GitHub Profile
@y4code
y4code / DT3 - Add OCR to PDF.scpt
Created March 1, 2023 22:49 — forked from julienma/DT3 - Add OCR to PDF.scpt
OCR PDFs in DEVONthink 3 with jbarlow83/OCRmyPDF
-- Script for DEVONthink 3
-- Run OCRmyPDF on PDFs without OCR
-- Requires https://github.com/jbarlow83/OCRmyPDF to be installed e.g. with brew
on performSmartRule(theRecords)
tell application id "DNtp"
set strExportPath to "PATH=/usr/local/bin:$PATH "
set intRecordsCount to count of theRecords
show progress indicator "Adding OCR to PDF..." steps intRecordsCount
repeat with theRecord in theRecords
@y4code
y4code / tag_v2ex_username.js
Last active April 25, 2024 18:05
给 V2EX 用户打标签
// ==UserScript==
// @name 给 V2EX 用户打标签
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.v2ex.com/*
// @match http*://*.v2ex.com/*
// @match http*://v2ex.com/*s
// @match https://v2ex.com/
@y4code
y4code / main.go
Created September 13, 2022 02:39
convert HTML to Markdown
package main
import (
md "github.com/JohannesKaufmann/html-to-markdown"
"io/ioutil"
"log"
"strings"
)
var converter = md.NewConverter("", true, nil)
@y4code
y4code / varTopCheckError.postfixTemplates
Last active December 16, 2021 04:39
Postfix Template File of postfix-completion Plugin
.varTopCheckError : err handle elegant way
ANY → var(\
err error\
$var:suggestVariableName()$ $type*:expressionType(expr))$\
)\
if $var:suggestVariableName()$, err = $expr$; err != nil {\
return nil, err\
}
@y4code
y4code / self_mod_launch_apps.json
Last active September 23, 2023 13:12
Karabiner mod arrow and launch apps
{
"title": "自己写的配置启动Apps",
"rules": [
{
"description": "用 right_command + i/j/k/l 到 Arrows",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "j",
@y4code
y4code / gist:47ca6a6df1af96242de2bd253b16f77b
Created October 26, 2020 05:16
v2ex按感谢数量查看帖子.js
// let ori = [];
// ori.sort(
// compare,
// )
// function compare(a: any, b: any): number {
// var a_compare = Number(a.getElementsByClassName('small fade')[0].innerText.substring(1)) ?? 0;
// var b_compare = Number(b.getElementsByClassName('small fade')[0].innerText.substring(1)) ?? 0;
@y4code
y4code / v2ex_for_work_tamper_monkey.js
Created April 24, 2020 10:03
上班滑水v2ex专用油猴脚本
// ==UserScript==
// @name V2EX for work
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author y4code
// @match *://*.v2ex.com/*
// @run-at document-end
// @grant none
// ==/UserScript==
@y4code
y4code / 旧版Karabiner配置.xml
Last active December 28, 2017 09:19
Karabiner Configuration XML
<?xml version="1.0"?>
<root>
<devicevendordef>
<vendorname>FirePadInc</vendorname>
<vendorid>0x1532</vendorid>
</devicevendordef>
<deviceproductdef>
<productname>FirePad_V1</productname>
@y4code
y4code / N6 刷 cm
Last active November 11, 2016 00:46
@MyDF 我用这个14年的这个刷re的bat命令不知是否可行?
我总结一下:
准备:cm-13.0-20161106-NIGHTLY-shamu.zip拷贝到手机
1.swipe
2.bat命令刷下载好的re cm-13.0-20161106-NIGHTLY-shamu-recovery.img
3.re中install选择zip
4.进机子之后刷opengapp arm 6.0 nano
图片链接:http://ww3.sinaimg.cn/large/006y8mN6gw1f9nvl33tt0j308p0j00u8.jpg
ok