Skip to content

Instantly share code, notes, and snippets.

@shanhaiying
shanhaiying / !!! StartHere !!!.md
Created November 25, 2021 18:37 — forked from emisjerry/!!! StartHere !!!.md
Obsidian Samples for Buttons plugin

🔅Buttons外掛開啟筆記自動化操作契機⁉️ 範例展示

📑 用樣板建立筆記

name 建立Obsidian筆記
type note(/new-obsidian, split) template
action template-obsidian
color purple
@shanhaiying
shanhaiying / mathml hacks
Created November 6, 2021 16:23 — forked from sdiehl/mathml hacks
mml.js
(function(jQuery) {
$(document).ready(function() {
var html_ns = document.body.namespaceURI,
mml_ns = "http://www.w3.org/1998/Math/MathML";
window.mml_ns = mml_ns;
document.html_ns = html_ns;
document.mml_ns = mml_ns;
@shanhaiying
shanhaiying / sync-zotero-refs.rb
Created October 31, 2021 17:53 — forked from bruce/sync-zotero-refs.rb
A hack to build references in Obsidian for Zotero items
#!/usr/bin/env ruby
require "net/http"
require "uri"
require "yaml"
require "json"
require "fileutils"
class String
def dasherize
@shanhaiying
shanhaiying / tool-tableconvert.md
Created August 17, 2021 14:39 — forked from Fechin/tool-tableconvert.md
https://tableconvert.com : A powerful online table editor that converts between CSV, HTML and Markdown. Easy to convert html tables to SQL, JSON, XML and Text, Makes it easier to work with tables.

TableConvert is a powerful online table editor that converts between CSV, HTML and Markdown. Easy to convert html tables to SQL, JSON, XML and Text, Makes it easier to work with tables.

Function list:

  • Convert csv to html
  • Convert csv to json
  • Convert csv to markdown
  • Convert csv to sql
  • Convert csv to xml
  • Convert html table to csv
  • Convert html table to json
@shanhaiying
shanhaiying / gollum_baiduyun_v3.4.5.js
Created March 18, 2017 05:07 — forked from mcxiaoke/gollum_baiduyun_v3.4.5.js
Gollum for Baiduyun, Ver.3.4.5
/**
* 贪灵Gollum for Baiduyun, Ver.3.4.5
* 立即执行函数:百度云盘批量转存用户分享。
*
* 【特点】
* - 可保持或无视原分享者的目录结构。
* - 支持差分转存。
* - 自动分解转存,可突破单次转存总文件数5000的限制。
* - 可在分享主页下,进入某文件夹来转存其下级子文件夹。
* - 支持专辑转存。
@shanhaiying
shanhaiying / bib_downloader.py
Created May 17, 2016 17:45 — forked from haccanri/bib_downloader.py
A script to extract title from hand-written bib items and download the bibtex item from Google Scholar with the help of scholar.py (https://github.com/hildensia/scholar).
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 23 21:13:21 2015
@author: Qing
A script to extract title from hand-written bib items and download the bibtex item
from Google Scholar with the help of scholar.py (https://github.com/hildensia/scholar).
"""
from subprocess import Popen, PIPE
import numpy as np
import matplotlib as mpl
mpl.use('pgf')
def figsize(scale):
fig_width_pt = 469.755 # Get this from LaTeX using \the\textwidth
inches_per_pt = 1.0/72.27 # Convert pt to inch
golden_mean = (np.sqrt(5.0)-1.0)/2.0 # Aesthetic ratio (you could change this)
fig_width = fig_width_pt*inches_per_pt*scale # width in inches
fig_height = fig_width*golden_mean # height in inches
@shanhaiying
shanhaiying / .latexmkrc
Last active August 29, 2015 14:22 — forked from fnurl/.latexmkrc
# Use xelatex instead of pdflatex
$pdflatex = 'xelatex -synctex=1 -interaction=nonstopmode --shell-escape %O %S';
# Always create PDFs
$pdf_mode = 1;
# Use Skim.app to preview generated PDFs
$pdf_previewer = 'open -a Skim.app %S';
# Use continous mode by default