The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,224 other subscribers

Archive for the ‘MarkDown’ Category

Some notes on converting Twitter threads/tweets to Markdown

Posted by jpluimers on 2023/03/29

I’ve switched to either Markdown or reStructuredText for documentation purposes a while ago.

Often Twitter threads or Tweets are a useful addition to that, so it makes sense being able to convert them to a more portable format, especially since both Markdown and reStructuredText render well on GitHub (including Gists) and GitLab (including Snippets).

So here are some links that hopefully will get me going in the future:

–jeroen

Posted in Development, Lightweight markup language, MarkDown, reStructuredText, Software Development | Leave a Comment »

A pain in the ass: gist include image in markdown in current directory – Google Search

Posted by jpluimers on 2023/03/08

This revealed so much pain: [Wayback] gist include image in markdown in current directory – Google Search

I wished that – like in the past – it would work just like in a normal github hosted git repository: [Wayback/Archive] How do I display local image in markdown? – Stack Overflow.

The core problem is that though a gist underneath is a git repository, it is rendered in a way that is different than a github repository is rendered, and that way of rendering has changed over the years effectively making it difficult to embed a picture. When you do embed an image requires the uuid/guid of the raw image URL to be included in the markdown, unlike with a regular repository hosted on github.

That is so much pain that I decided to not host documentation in gists any more.

A bit of the pain:

This is an example gist where I tried to host an image: [Wayback/Archive] Windows 7 with PowerShell v2 fails to upgrade to PowerShell v3 through chocolatey: You must provide a value expression on the right-hand side of the '-' operator.

That gist was prelude to my post Chocolatey on Windows 7: “You must provide a value expression on the right-hand side of the ‘-‘ operator.”.

–jeroen

Posted in Development, DVCS - Distributed Version Control, gist, git, GitHub, Lightweight markup language, MarkDown, Software Development, Source Code Management | Leave a Comment »

Learning github actions by creating a repository with a dynamic README.md for your profile information

Posted by jpluimers on 2023/01/23

TL;DR:

  1. Create a GitHub repository with the same name as your profile name
  2. Add a README.md with Markdown describing your profile
  3. In the README.md, add begin/end HTML comment markers <!-- and --> for various types of dynamic content
  4. In the Actions of this repository, add Workflows for each of the set comment markers that use them to refresh that part of the content using GitHub Actions learning some continuous integration/continuousc deployment (CI/CD) on the fly.

You can spice this up with all kinds of badges to make it look pretty.

HTML Comments in Markdown?

Yes, it is indeed odd to have HTML comments in Markdown where you could just as easy use Markdown comments, but hey: I didn’t define the way this works.

A Markdown comment looks like this:

(empty line)
[comment]: # (This actually is the most platform independent comment)

For explanation on why/how this works, see the below two great StackOverflow answers in this order:

  1. [Wayback/Archive] syntax – Comments in Markdown: concise example – Stack Overflow by [Wayback/Archive] Magnus.
  2. [Wayback/Archive] syntax – Comments in Markdown: explainer – Stack Overflow by [Wayback/Archive] User Nick Volynkin – Stack Overflow

Howto

The below two videos (also embedded below the signature) show how to do this. Thanks [Archive] Jesse Hall 🦸‍♂️ #vsCodeHero (@codeSTACKr) | Twitter for creating them!

  1. [Wayback/Archive] Next Level GitHub Profile README (NEW) | How To Create An Amazing Profile ReadMe With GitHub Actions – YouTube
  2. [Wayback/Archive] UPDATE: Next Level GitHub Profile README (NEW) | GitHub Actions | Vercel | Spotify – YouTube

The description of the videos contain all sorts of links to sites and underlying repositories for:

  • icons
  • shields
  • badges
  • youtube/blog/RSS and other feed actions
  • profile examples

You can see the effects at [Wayback/Archive] codeSTACKr/codeSTACKr in the [Wayback/Archive] raw README.md sources.

Enough to get you some experimentation (:

Watch your commits

One of the drawbacks of mixing manual and automated changes to a repository, is that the automated changes can cause a lot of commits.

This is OK as long as the automated changes add value to the changed content.

In this regard, having stable RSS feeds is important, and YouTube is kind of bad at this when you look at [Wayback/Archive] History for README.md – codeSTACKr/codeSTACKr: videos changing order or popping in/out of the last 5 is kind of annoying.

–jeroen

Read the rest of this entry »

Posted in Development, DVCS - Distributed Version Control, git, GitHub, GitHub Actions, Lightweight markup language, MarkDown, Power User, Source Code Management | Leave a Comment »

Exporting your Twitter content, converting to Markdown and getting the image alt-texts (thanks @isotopp/@HBeckPDX/@weiglemc for the info and @kcgreenn/@dreamjar for the comic!)

Posted by jpluimers on 2022/11/12

This is fine #Twitter

This is fine #Twitter (illustration inspired by KC Green; creation video below)

(Edit 20221114: script for high-res images; more tweets from Jan) (Edit 20221116: hat-tip to Sam) (Edit 20221120: archiving t.co links by Michele Weigle) (Edit 20221122: added article by Johan van der Knijff) (20221128 Tapue export tool by Mike Hucka)

Time to be prepared:

The below will help you exporting your Twitter content (Tweets, DMs, media), perform some conversions on them and optionally delete (parts of) your content.

Important: keep your Twitter account afterwards (to prevent someone from creating a new account with the same handle).

Read the rest of this entry »

Posted in *nix, *nix-tools, Awk, Development, Lightweight markup language, MarkDown, Mastodon, Power User, SocialMedia, Software Development, Twitter | Leave a Comment »

HTML / XML / RSS link checker – Visual Studio Marketplace

Posted by jpluimers on 2022/10/04

On my list of Visual Studio Code extensions to try (after I change the shortcuts, as direct Alt shortcuts are not a good idea, luckily those are configurable)

[Wayback/Archive.is] HTML / XML / RSS link checker – Visual Studio Marketplace (partly paraphrased):

VSCode extension that checks for broken links in an HTML, XML, RSS, PHP, or Markdown file.

Checks currently open file:

  • for broken links in anchor-href, link-href, img-src, and script-src tags in currently-open HTML or PHP file
  • both clearnet and onion (Tor) links
  • for badly-formatted mailto links, and duplicate local anchors (anchor-name, anchor-id)
  • for working HTTPS equivalents of HTTP links

Optionally checks for invalid characters and common mistakes (missing tag content, empty attribute value, more).

Also checks for errors in a small subset of semantic HTML tags (in HTML and PHP files): checks that each page has header, main, footer; checks that each heading is inside a section, article, or aside; checks that each section/article/aside has exactly one heading in it; checks that heading values are nested properly.

To see/change settings for this extension, open Settings (Ctrl+,) / Extensions / “HTML / XML / RSS link checker”.

To change the key-combinations for this extension, open File / Preferences / Keyboard Shortcuts and search for Alt+H or Alt+T or Alt+M or Alt+L.

–jeroen

Posted in .NET, Development, HTML, Lightweight markup language, MarkDown, Power User, RSS, Software Development, vscode Visual Studio Code, Web Development, XML, XML/XSD | Leave a Comment »

 
%d bloggers like this: