This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pandoc \ | |
preface.md \ | |
part-i.md \ | |
ch1.md \ | |
ch2.md \ | |
ch3.md \ | |
ch4.md \ | |
part-ii.md \ | |
ch5.md \ | |
ch6.md \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://gist.github.com/cdpath/0045a3f28cfd477af3129d1ff5e0c6fe | |
const { | |
aceVimMap, | |
mapkey, | |
imap, | |
imapkey, | |
insertJS, | |
getClickableElements, | |
vmapkey, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
PRECOMMIT_CONFIG=".pre-commit-config.yaml" | |
MYPY_CONFIG="mypy.ini" | |
echo "installing pre-commit" | |
pip install pre-commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Cusor */ | |
.cm-fat-cursor .CodeMirror-cursor { | |
background-color: black; | |
opacity: 0.5; | |
width: 5px; | |
} | |
.cm-animate-fat-cursor { | |
background-color: black; | |
opacity: 0.5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from functools import partial | |
def is_class_of(tag, class_): | |
try: | |
return tag.attrs['class'][0] == class_ | |
except Exception: | |
return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Word Tree / Roget's Thesaurus | |
* Class I. Words Expressing Abstract Relations | |
** Section I. Existence | |
*** 1. Being, in The Abstract | |
***** existence 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"schema_version": 1, | |
"name": "RSS", | |
"description": "Design Daily", | |
"source_url": false, | |
"guid": "34862db1b1318cda2d8b50a94908ffa3", | |
"tag_fg_color": "#ffffff", | |
"tag_bg_color": "#ff8000", | |
"icon": "signal", | |
"exported_at": "2018-05-14T11:06:25Z", |