Skip to content

Instantly share code, notes, and snippets.

@bmaupin
bmaupin / my-cloud-device-lockdown.md
Last active April 4, 2023 00:23
My Cloud device lockdown
@bmaupin
bmaupin / alternatives-to-katacoda.md
Created August 4, 2022 16:58
Alternatives to Katacoda

O'Reilly bought and shut down katacoda.com 😕

Alternatives:

Site Notes
killercoda.com Seems to be the closest replacement for Katacoda
Play with Docker Just for Docker, requires a free Docker account
Instruqt This looks like more of a solution for vendors than a generally available platform
This is what Red Hat has chosen to replace Katacoda for their interactive tutorials: https://developers.redhat.com/learn#assembly-id-70181
Source code here: https://github.com/openshift-instruqt/instruqt
@bmaupin
bmaupin / reasons-not-to-use-windows.md
Last active June 5, 2024 12:43
Reasons not to use Windows

Files and file systems

  • In Windows, files that are in use cannot be modified
    • As a result, Windows updates have to happen when the computer is not in use, such as during shutdown or boot (often both)
      • Compare to Linux/macOS, which can install updates while the computer is being used 😎
  • Windows uses backslashes (\) as file system path separators
    • All other modern operating systems (macOS, Linux, Android, iOS, etc) use a normal (i.e. forward) slash (/) and use backslashes for escaping
  • Windows' NTFS filesystem performs poorly compared to Linux's ext4 filesystem

> Unfortunately, WSL1 was hampered by the performance characteristics of NTFS, which do not match the expectations of Linux software. Microsoft has since replaced WSL1 with WSL2, which provides similar functionality by running the Linux kernel in a virtual machine. In WSL2, Linux software runs against an ext4 file system, rather than an NTFS file system.

@bmaupin
bmaupin / javascript-xml-parsers.md
Last active May 23, 2024 03:31
JavaScript XML parsers
Parser Size Maintained Node.js Browser Streaming Types Modifying XML Notes
jsdom 3.11 MB yes yes N/A DefinitelyTyped yes Probably the best choice since its API is closest to the browser API for manipulating XML
cheerio 558 kB yes yes yes included yes jQuery-like API for parsing and manipulating HTML and XML
xmldoc 41.4 kB yes yes yes DefinitelyTyped Partial, not recommended (nfarina/xmldoc#51)
@xmldom/xmldom 182 kB yes yes yes included yes ⚠️ Based on DOM but no querySelector/querySelectorAll
sax 55 kB yes yes yes? yes DefinitelyTyped Not recommended ⚠️ API is callback-based and very cludgy, but it has streamin
@bmaupin
bmaupin / programming-languages.md
Last active June 20, 2022 18:11
Thoughts on programming languages

ⓘ This list is more-or-less limited to languages I have personal experience with

C#

  • Recommended?: 👎
  • Pros
    • Like a more modern Java without a lot of Java's problems
  • Cons
    • Although it is now open-source with .NET Core, a lot of existing code and libraries aren't compatible
    • A fully open-source .NET/C# seems to conflict with Microsoft's priorities: Can we trust Microsoft with Open Source?
  • See also: Is .NET an open platform yet?
@bmaupin
bmaupin / ui-component-libraries.md
Last active January 16, 2023 14:39
UI component libraries
@bmaupin
bmaupin / 2022-russian-invasion-of-ukraine-maps.md
Last active October 18, 2022 12:56
2022 Russian invasion of Ukraine maps

Latest Latest Russian invasion of Ukraine map

2022-09-05 2022-09-05 Russian invasion of Ukraine map

2022-04-08 2022-04-08 Russian invasion of Ukraine map

2022-03-16

@bmaupin
bmaupin / javascript-date-time-gotchas.md
Last active November 24, 2021 15:29
JavaScript date/time gotchas

TL;DR

  • The general consensus seems to be use UTC everywhere and convert to the local time zone when displaying dates/times to the user
    • UTC isn't perfect; aside from leap seconds, the biggest issue seems to be when local time zone rules change, making dates stored in UTC inaccurate
  • When passing timestamps over the wire (e.g. to/from an API), convert them to strings using an unambiguous standard format that includes the time zone such as ISO 8601
    • In TypeScript/JavaScript this can be accomplished using Date.toISOString(). Use new Date(dateString) to convert back into a Date object
  • In the cases where the time zone is set to UTC but a local timestamp is needed (e.g. to represent "today midnight"), a library may be needed: https://momentjs.com/docs/#/-project-status/recommendations/

[new Date(year, monthIndex, day)](https://developer.mozilla.org/docs

@bmaupin
bmaupin / modern-native-compiled-languages.md
Last active October 14, 2024 23:38
Modern high-level languages that compile to native binaries

Goal

A simple way to write native applications (particularly CLI applications but optionally GUI applications) in a modern language (e.g. not C++/Qt) that's fun to use (e.g. not Go). This is primarily for small utilities where speed isn't a big concern. Binary size is a mild concern. Most of the rest is just icing on the cake (cross-compile support, etc).

Summary

Language High-level Garbage-collected Cross-compiling REPL Backed by large organization Cross-platform GUI library Comments
👉 TypeScript with pkg yes yes yes yes yes yes This isn't really "native" but may be the best option for something quick and dirty without having to resort to less-fun languages (like Go). See test-javascript-executables for ways to get the binary as small as possible.
Kotlin with GraalVM yes yes ⚠ [no](https://github.com/oracle/graal/
@bmaupin
bmaupin / kobo-support.md
Last active October 4, 2021 19:08
Kobo support