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
-- Query the API directly and flatten the nested JSON structure | |
WITH raw_data AS ( | |
SELECT * FROM read_json_auto('https://public.api.bsky.app/xrpc/app.bsky.feed.getAuthorFeed?actor=did:plc:edglm4muiyzty2snc55ysuqx&limit=10') | |
), | |
unnested_feed AS ( | |
SELECT unnest(feed) as post_data FROM raw_data | |
) | |
SELECT | |
-- Post basics | |
post_data.post.uri as post_uri, |
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 xml.etree.ElementTree as ET | |
import PyRSS2Gen as rss | |
import datetime | |
# Parse the sitemap.xml | |
tree = ET.parse("book/sitemap.xml") | |
root = tree.getroot() | |
# Define the RSS feed basic info | |
rss_feed = rss.RSS2( |
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
/* Themes */ | |
/* My favorite theme: https://github.com/rebelot/kanagawa.nvim */ | |
.kanagawa { | |
/* Using the Kanagawa color palette */ | |
--bg: #1F1F28; /* sumiInk1 for Default background */ | |
--fg: #DCD7BA; /* fujiWhite for Default foreground */ | |
--sidebar-bg: #2A2A37; /* sumiInk2 for a subtler sidebar background */ | |
--sidebar-fg: #C8C093; /* oldWhite for Dark foreground in sidebar */ |
We can make this file beautiful and searchable if this error is corrected: Any value after quoted field isn't allowed in line 3.
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
"act","prompt" | |
"Rust Developer", "I want you to act as a expert Rust software developer. I will provide some specific information about a Rust project and you will have to come up with a solution. I will provide you with a Rust project that has a long code in one file. I want you to write well structured code" | |
"Technical Author and Data Engineer", "I want you to act as an expert Data Engineer and someone fond of diving into the latest in open-source data engineering on my blog. Your voice isAuthentic, friendly succinct, and informative with the goal of value-adding to the readers. The writing whenever possible in the I form. So I can be honest and trustworthy. You try to give clues and tools concrete and extremely specific. The Key is to inspire instead of describing everything. You tell a story and involve the user with well structure such as 1. writing about now 2. us 3. self like described in the "Public Narrative" with Collective Action and Power now us and self. You help the user by highlighting importan |
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
"Convert exported HTML pages to Markdown pages recursively where you start this script from" | |
import os | |
from markdownify import markdownify | |
from pathlib import Path | |
for dirpath, dirs, files in os.walk("."): | |
print("--" + dirpath) | |
for filename in files: | |
if filename.endswith(".html"): |
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
""" | |
If you moved from Wordpress to GoHugo and all your images are in "/images/wp-content", but you want to use image processing or other featues of GoHugo | |
that only works in the content-folder (/content/posts/). | |
This script | |
1. searches all images from wordpress which are used in the content | |
2. creating a folder with the name of the content-file (*.md) | |
3. moving images to /content/posts/my-post-name/images | |
4. and creates and index.en.md with the content. | |
After you run it, I used regexp search/replace in visual studio to replace old images to new path inside the content (*.md) files. |
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
### README | |
# This Python scripts exports all the OneNote notebooks linked to your Microsoft account to HTML files. | |
## Output | |
# The notebooks will each become a subdirectory of the `output` folder, with further subdirectories | |
# for the sections within each notebook and the pages within each section. Each page is a directory | |
# containing the HTML file `<page-name>.html` and its images and attachments. I changed to create | |
# sepearte directories for `images` and `attachments` as my Markdown editor (obsidian) would show | |
# this directories seperately what didn't look nice in the File-Tree. Like this, images and Attachments | |
# are not shown in the tree but within the Markdown which is what I wanted. Any sub-pages will be |