Skip to content

Instantly share code, notes, and snippets.

View thgie's full-sized avatar

Adrian Demleitner thgie

View GitHub Profile
@thgie
thgie / obsidian-web-clipper.js
Last active January 22, 2024 08:10 — 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 "incoming/booksmarks/" */
@thgie
thgie / post-merge
Last active April 19, 2022 15:38
git hook to compile and deploy a bunch of markdown files to a html website with the help of pandoc. used by https://github.com/thgie/jache.re
#!/bin/sh
INPUT_DIR="$(pwd)/"
OUTPUT_DIR="/var/www/jache.re/"
git diff-tree -r --name-only --no-commit-id HEAD@{1} HEAD | grep -E '.md' | while read file ; do
# prepare input file string
INPUT_FILE="${file#\"}"
from microbit import *
while True:
x = accelerometer.get_x()
y = accelerometer.get_y()
z = accelerometer.get_z()
print("x, y, z:", x, y, z)
sleep(500)
@thgie
thgie / parse-evernote-for-web.clip-url
Created July 12, 2017 08:01
This is a small node.js script that parses an Enex (Evernote export) file for the web.clip url and saves the matches as txt
fs = require('fs')
fs.readFile('Evernote.enex', 'utf8', function (err,data) {
if (err) {
return console.log(err);
}
var pattern = /<source>web.clip<\/source><source-url>(.*?)<\/source-url>/g
var matches = [], match = pattern.exec(data)
while (match != null) {
matches.push(match[1])
¡–¢ÿ¢—£ÿ¢—£ÿ¡™¥ÿ£˜¥ÿ¤™¦ÿ¤™¦ÿ š¥ÿ¡š¨ÿ¦š§ÿ¤›©ÿ¦›ªÿ¦›¨ÿ§ž¬ÿªœªÿ¨œ¬ÿ©ªÿª ¯ÿ© ¯ÿ¨ ¬ÿª¡­ÿ­¡®ÿ¬¢¬ÿ¬¡¬ÿ­¡®ÿ®£¯ÿª¤¯ÿ©¥¯ÿ­¦´ÿ°¤³ÿ°¤´ÿ¯¦µÿ°¦µÿ°¦µÿ²§´ÿ°¨´ÿ²¨²ÿ±¨´ÿ´©¶ÿ³¨µÿ³ª¶ÿ´©¶ÿ´¨µÿ³ª¶ÿ´«¹ÿµª·ÿµ©¸ÿµª¹ÿ·¬¹ÿ·¬¹ÿ·«»ÿµ¬½ÿ·«»ÿ¶®ºÿ·­¼ÿ¸¯»ÿ·­¼ÿ¸®½ÿ¹®»ÿ¶¯¿ÿ¸¯»ÿº¯¾ÿ¶¯½ÿ¹¯Àÿ¹°Àÿº±¿ÿ¸±¿ÿ·±¾ÿ·±¾ÿº±¿ÿº±Áÿº°Áÿº±¿ÿ½±Âÿ¼±Àÿ»°Áÿ¸³Âÿº²Ãÿº´Áÿ·µÂÿ¼³¿ÿ»´Âÿ½´Ãÿ½¶Äÿ¼µÃÿ¿¶Âÿ½´Ãÿ½¶Äÿ¿µÄÿ¿¶Äÿ½¶Äÿ¾·Åÿ¼¸Çÿ½¸Çÿ¾·ÇÿÀ¶Çÿ¾·ÇÿÁ·Èÿ¾¸Åÿ¿¸Æÿ¾·Åÿ¾·Åÿ¾¹Æÿ¿¸ÆÿÀ¹ÉÿÀ¹ÉÿÀºÇÿÀ¹Éÿ¿»ÇÿÁºÈÿÁºÇÿùÊÿÀ¹ÉÿÁ¹Êÿ¿ºÊÿºËÿÁ¼ÎÿÀ»ÊÿºËÿûÌÿÁ¼ÌÿüÊÿÁ¼Ìÿ½ÍÿĽÍÿĽËÿ½ÍÿÁ¾ÍÿÁ¾ÍÿÁ¿ËÿÿÌÿžÌÿžÎÿĽÍÿžÌÿĽÍÿǽÎÿǽÌÿǾÌÿžÎÿÅÀÑÿÇÀÐÿÄÂÐÿÇÁÎÿÃÁÍÿÄÄÑÿÅÃÑÿÆÃÔÿÇÂÒÿËÄÒÿÈÄÐÿÈÄÑÿÊÃÑÿÇÂÑÿÇÅÑÿÇÂÑÿÈÃÓÿÊÃÓÿÉÅÒÿÎÃÒÿËÄÒÿËÄÔÿÈÃÕÿËÄÒÿÎÄÕÿÎÅÓÿÌÅÕÿÍÆÔÿÏÆÔÿÎÅÓÿÎÇÕÿÐÇÕÿÍÇÔÿÌÇÖÿÍÆÖÿÐÆ×ÿÐÇ×ÿÓÇÖÿÑÈÖÿÑÈÖÿÓÇÖÿÔÉØÿÓÇÙÿÓÇÙÿÓÇÙÿÒÉÙÿÒÉØÿkZ`ÿe[eÿfYdÿiYeÿlXhÿhYlÿk[iÿgWfÿiYlÿhZlÿi[kÿn`eÿo`eÿh`gÿn^jÿo`kÿj^pÿl]pÿj^nÿm_mÿnalÿlblÿm`kÿpbkÿnbhÿqbiÿneqÿpdsÿmdpÿmftÿocpÿresÿperÿphtÿofsÿsftÿtfvÿvhvÿwjwÿvhxÿvhxÿvhxÿqjxÿqmwÿsoyÿxkvÿ{nyÿykyÿwq~ÿym}ÿxm~ÿxqÿvoÿ|n|ÿzs~ÿ€pzÿxt~ÿyuÿ|q€ÿ~tƒÿ}t…ÿ|r†ÿyv…ÿ}tƒÿ~xƒÿ~xƒÿƒx…ÿx„ÿ€wƒÿ