Skip to content

Instantly share code, notes, and snippets.

@khalidx
khalidx / node-typescript-esm.md
Last active April 22, 2024 15:40
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

@marco79cgn
marco79cgn / dm-toilet-paper.js
Last active February 29, 2024 17:35
iOS Widget, das die Anzahl an Klopapier Packungen in deiner nächsten dm Drogerie anzeigt (für die scriptable.app)
// dm Klopapier Widget
//
// Copyright (C) 2020 by marco79 <marco79cgn@gmail.com>
//
// Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
// IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE

Typesetting Libraries and Plugins

These are tools that improve typographic details like microtypography and typographic syntax automatically.

Additions welcome!

Name Language/Platform
Detergent JavaScript (ESM)
JoliTypo PHP
# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
<!DOCTYPE html>
<html>
<head>
<title>Demo: Treat Safari 11 and Prior as nomodule</title>
</head>
<body>
<script>
if (/Safari\/5/.test(navigator.userAgent)) {
var $fss = function () {
for (var i of document.scripts) {
@fstanis
fstanis / index.html
Last active March 16, 2020 03:15
Webpack HTML entry
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="./style.css">
</head>
<body>

Music for working, programming, reading, …

…sleeping, meditating, yoga, after hour…. Mostly ambient, drone, (neo-)classical, dub, minimal techno, deep house, micro house, downtempo, slo-mo house, ketapop, schneckno, jetlagdisco, post-rock, lowfi hip hop…

Please feel free to comment your recommendations.

// helper functions
var getJSON = function (nameOfFile) {
var dataFile = File(docPath + '/' + nameOfFile + ".json");
dataFile.open();
data = dataFile.read();
data = eval(data);
dataFile.close();
return data;
};

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.
@mbostock
mbostock / .gitignore
Last active September 13, 2019 01:32
Force GIF
*.png
*.gif