Skip to content

Instantly share code, notes, and snippets.

@ebdavison
ebdavison / obsidian-web-clipper.js
Created November 18, 2023 19:01 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
#!/usr/bin/env python3
'''
A script to recursively compare two directories (including file size and file hash changes)
Usage: python3 compare_dirs.py DIR1 DIR2
'''
import os, sys, hashlib, unicodedata
COMPARE_FILES = True # should file sizes be compared if their names are the same?
@ebdavison
ebdavison / stat_graph.css
Created April 13, 2018 16:10
D3 code with variable
.graph {
font: 10px sans-serif;
}
.axis path,
.axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
.x.axis path {
@ebdavison
ebdavison / root-urls.py
Last active March 23, 2018 16:42
urlpatterns
Page not found (404)
Request Method: GET
Request URL: https://www.example.com/wfpsite/blog
Using the URLconf defined in az.urls, Django tried these URL patterns, in this order:
^$
^admin/
^aztrack/
@ebdavison
ebdavison / .block
Created December 7, 2017 19:41
d3 | reusable heatmap calendar
license: mit
> for (i in dtcols) {
+ print(i)
+ str(i)
+ newname <- gsub("^X", "", i)
+ print(newname)
+ str(newname)
+ }
[1] "X08.04.17"
chr "X08.04.17"
[1] "08.04.17"