Skip to content

Instantly share code, notes, and snippets.

Markdown to WordPress
if(op.attributes.exists("type") && op.attributes.getOne("type")=="outline"){
var wp_post = opml.parse(op.getCursorOpml());
var title = wp_post.opml.head.title;
var text = "";
var imagepart="";
for (i=0;i<wp_post.opml.body.subs[0].subs.length;i++){
if(wp_post.opml.body.subs[0].subs[i].image !==undefined){
var imagepart="![]("+string.multipleReplaceAll(wp_post.opml.body.subs[0].subs[i].image,{" ":"%20"})+")";
text=text+imagepart;
@frankmeeuwsen
frankmeeuwsen / dataview
Created January 21, 2024 10:17
Dataview to get the output under a specific heading in your notes
```dataview
TABLE L.text AS "Articlelist"
FROM #weeknotes
FLATTEN file.lists as L
WHERE meta(L.section).subpath = "Articles"
SORT file.ctime DESC
LIMIT 25
```
@frankmeeuwsen
frankmeeuwsen / gist:0d0e6c7d0fb18f33b5b85f8f1851888b
Created January 21, 2024 10:24
Dataview to get a list of files that are updated in the last 7 days
```dataview
TABLE file.name, file.ctime AS "Created"
WHERE file.ctime >= date(<% tp.date.now("YYYY-MM-DD", -7) %>) and file.ctime < date(<% tp.date.now("YYYY-MM-DD") %>)
sort file.ctime
```
@frankmeeuwsen
frankmeeuwsen / gist:43b5825a21fe17cf57045a8775f5cf64
Created February 18, 2024 09:46
Karabiner - F19 (Capslock) to Control in Emacs
{
"description": "F19 (Capslock) to Control in Emacs",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.gnu\\.Emacs$"
],
"type": "frontmost_application_if"