Skip to content

Instantly share code, notes, and snippets.

View temberature's full-sized avatar

Tong temberature

  • USA
View GitHub Profile
@u1i
u1i / doit.txt
Created June 21, 2021 11:28
pdftk MacOs M1
https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk_server-2.02-mac_osx-10.11-setup.pkg
@zsviczian
zsviczian / MindmapInput.md
Created May 7, 2021 18:56
This is an Obsidian Templater script that genrates a mindmap drawing from a tabulated outline, similar to the sample outline attached.
  • Test 1
    • Test 1.1
  • Test 2
    • Test 2.1
    • Test 2.2
      • Test 2.2.1
      • Test 2.2.2
      • Test 2.2.3
        • Test 2.2.3.1
  • Test 3
@TfTHacker
TfTHacker / Hypothesidian.js
Last active April 25, 2025 18:48
Hypothes.is - retrieve your annotations into Obsidian (for templater plugin)
<%*
/*
# Hypothes.idian a templater script for retrieving annotations from Hypothes.is
Dev: TfTHacker https://twitter.com/TfTHacker
# Prerequisites:
+ Templater plugin by https://github.com/SilentVoid13/Templater
+ Free Hypothes.is developer token from: https://hypothes.is/account/developer
+ This script will prompt you for his token and save it to a file called "hypothesis config.md"
+ This file store your configuration and can be located any where in your vault.
@azlen
azlen / bulletpaths.js
Last active February 28, 2025 16:24
All Paths Lead to Roam
/*
* credit to Dhrumil Shah (@wandcrafting) and Robert Haisfield (@RobertHaisfield)
* for the original concept which was part of their RoamGames submission
* and can be found at: https://www.figma.com/file/5shwLdUCHxSaPNEO7pazbe/
*
*/
/* ======= OPTIONS ======== */
/* note: if you change these, reload the page to see the effect */
#!/bin/sh
umask 077
# File extension for the notes
note_ext="md"
fzf_opts="--height 50%"
# Preview script part of FZF.vim. Defaults to something else if not present (but
# not as fancy)
@ahxxm
ahxxm / doubanbook-cralwer.clj
Last active November 21, 2022 13:59
title + <div id="info" /> => local redis
(ns doubanbook-cralwer.core
(:require [clj-http.client :as http]
[clojure.core.async :refer [go-loop chan <! >!! <!!] :as a]
[taoensso.carmine :as car :refer (wcar)])
(:gen-class))
(def ua "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36")
(def redis-opts {:pool {} :spec {:uri "redis://127.0.0.1:6379/0"}})
(defmacro wcar* [& body] `(car/wcar redis-opts ~@body))
(def seen (atom (into #{} (wcar* (car/keys "*")))))
@zzjtnb
zzjtnb / Telegram解决+86不能私聊其他用户的方案:
Created November 18, 2018 08:09
@SpamBot 提出申请半小时内即可解开
Telegram 给某人发送私聊消息时遇到如下提示:
Sorry,you can only send messages to mutual contacts at the momet.
中文:抱歉,您现在只能给双向联系人发送消息。
原因:
前段时间币圈利用Telegram 的便利,大量发广告和拉人进群。Telegram 限制了+86 大陆手机号绑定的账号的私聊。
+86 的账号不能给非+86 的账号主动发起私聊,+86 的账号能给+86 主动发起私聊的;刚刚注册的+86 账号也不能发起私聊的,过段时间就OK了。
解决办法:
1. 两个人建立一个群来作为私聊交流
@kpmiller
kpmiller / quartzexample.py
Created September 11, 2018 18:58
Example of using core graphics from quartz to make a pdf file, using Apple built in python bindings
#!/usr/bin/python
#tested on 10.12 and 10.13
import Quartz
from Quartz.CoreGraphics import *
import Cocoa
import random
random.seed()
@mi-lee
mi-lee / all-books-search.js
Created March 20, 2018 23:15
Bookmarklet. Searches for highlighted book title on: Libgen, UBC Library, Goodreads, and Toronto Public Library
javascript:window.open('http://www.torontopubliclibrary.ca/search.jsp?Ntt='+encodeURIComponent(window.getSelection().toString()), '', 'left=0,top=0,width=550,height=450,personalbar=0,toolbar=0,scrollbars=0,resizable=0');
javascript:window.open('http://gen.lib.rus.ec/search.php?req='+encodeURIComponent(window.getSelection().toString()), '', 'left=0,top=0,width=550,height=450,personalbar=0,toolbar=0,scrollbars=0,resizable=0');
javascript:window.open('http://ubc.summon.serialssolutions.com/search?spellcheck=true&s.q='+encodeURIComponent(window.getSelection().toString()), '', 'left=0,top=0,width=550,height=450,personalbar=0,toolbar=0,scrollbars=0,resizable=0');
javascript:window.open('https://www.goodreads.com/search?utf8=✓&search%5Bquery%5D='+encodeURIComponent(window.getSelection().toString()), '', 'left=0,top=0,width=550,height=450,personalbar=0,toolbar=0,scrollbars=0,resizable=0');
@notoriousb1t
notoriousb1t / index.html
Last active July 18, 2019 12:11
Request Idle Callback Example
<div id="app">
<div>
<button @click="task.start()">Start</button>
<button @click="task.stop()">Stop</button>
</div>
<textarea class="log">{{log}}</textarea>
</div>