first request sid (so as to communicate Synology API)
python t2ds.py login -u <username> -p <password> [--otp 233333]
then create download task
python t2ds.py task --sid
-- open -g hammerspoon://eudic?query=hammer | |
hs.urlevent.bind("eudic", function(eventName, params) | |
cmd = string.format('tell application id "com.eusoft.eudic" to activate & show dic with word "%s"', params['query']) | |
hs.applescript(cmd) | |
end) |
body{font-family:"Lucida Grande", "Open Sans", "Lucida Sans Unicode";font-size:100%;padding:0%;} | |
a{text-decoration:none;color:#000;} | |
p.lnk,p.lnk a{font-style:bold;color:blue;} | |
p.dg{margin-top:5px;margin-bottom:2px;} | |
span.r{color:#202040;} | |
/* span.ctx,a.ctx{color:blue;} */ | |
span.sc{font-variant:initial; font-size: 75%; padding: 0px 2px 0px 2px; border: 1px solid gray; margin-right: 2pt;color: black;} | |
/* h2{font-weight:400;border-bottom:1px dotted #404040;color:#000;font-size:110%;margin-bottom:3px;margin-top:10px;} */ | |
/* Word Entry*/ | |
h2{font-family:"Helvetica";font-size:100%; margin-top:2px;margin-bottom:2px} |
import os | |
from functools import partial | |
def is_class_of(tag, class_): | |
try: | |
return tag.attrs['class'][0] == class_ | |
except Exception: | |
return False |
def upsert(session, model, rows): | |
table = model.__table__ | |
stmt = postgresql.insert(table) | |
primary_keys = [key.name for key in inspect(table).primary_key] | |
update_dict = {c.name: c for c in stmt.excluded if not c.primary_key} | |
if not update_dict: | |
raise ValueError("insert_or_update resulted in an empty update_dict") | |
stmt = stmt.on_conflict_do_update(index_elements=primary_keys, |
/* Cusor */ | |
.cm-fat-cursor .CodeMirror-cursor { | |
background-color: black; | |
opacity: 0.5; | |
width: 5px; | |
} | |
.cm-animate-fat-cursor { | |
background-color: black; | |
opacity: 0.5; |
#!/bin/bash | |
set -euo pipefail | |
PRECOMMIT_CONFIG=".pre-commit-config.yaml" | |
MYPY_CONFIG="mypy.ini" | |
echo "installing pre-commit" | |
pip install pre-commit |
// https://gist.github.com/cdpath/0045a3f28cfd477af3129d1ff5e0c6fe | |
const { | |
aceVimMap, | |
mapkey, | |
imap, | |
imapkey, | |
insertJS, | |
getClickableElements, | |
vmapkey, |
pandoc \ | |
preface.md \ | |
part-i.md \ | |
ch1.md \ | |
ch2.md \ | |
ch3.md \ | |
ch4.md \ | |
part-ii.md \ | |
ch5.md \ | |
ch6.md \ |
user: openpai | |
password: openpai | |
docker_image_tag: v1.8.0 | |
gcr_image_repo: "registry.aliyuncs.com" | |
kube_image_repo: "registry.aliyuncs.com/google_containers" | |
openpai_kubespray_extra_var: | |
pod_infra_image_repo: "registry.aliyuncs.com/google_containers/pause-{{ image_arch }}" | |
dnsautoscaler_image_repo: "mirrorgooglecontainers/cluster-proportional-autoscaler-{{ image_arch }}" |
first request sid (so as to communicate Synology API)
python t2ds.py login -u <username> -p <password> [--otp 233333]
then create download task
python t2ds.py task --sid