Skip to content

Instantly share code, notes, and snippets.

@dimitropoulos
dimitropoulos / relative-time-noon-demo.md
Last active September 11, 2026 14:55
Time moves: a live relative-time-element demo in GitHub Markdown

LIVE WEB COMPONENT

Time moves.

These are native <relative-time> elements. GitHub localizes and updates them in your browser, including every second near noon.

TIME UNTIL NOON TODAY

noon EDT

you can do asdf

or the same with html tags

asdf

but did you know you can nest them infinitely?

asdf

@dimitropoulos
dimitropoulos / pick.md
Last active October 7, 2023 21:25
Pick typehero example

The problem Pick solves

Pick is a very useful helper type that allows you to create a type by using an existing type as a starting point.

Say, for example, your codebase has a type that looks like this:

interface Pokemon {
  name: string;
  type: string;
@dimitropoulos
dimitropoulos / gist:56f6834ce11ddf59f56b4a6e1ec10523
Last active November 1, 2022 12:13
Take the argument destructuring challenge

Take the argument destructuring challenge

const quiz1 = ({ a, b = 2 }) => b;
const quiz2 = ({ a, b = 2 } = {}) => b;
const quiz3 = ({ a, b = 2 } = { b: 3 }) => b;
const quiz4 = ({ a, b } = { b: 3 }) => b;
const quiz5 = ({ a, b }) => b;
const enum Finger {
LeftPinky = 1,
LeftRing = 2,
LeftMiddle = 3,
LeftIndex = 4,
Thumb = 5,
RightIndex = 6,
RightMiddle = 7,
RightRing = 8,
// ==UserScript==
// @name DisplaySpecifications user-select
// @version 0.1
// @author Dimitri Mitropoulos
// @match https://www.displayspecifications.com/*
// @grant none
// ==/UserScript==
(() => {
const addGlobalStyle = css => {

Count of runs for thing where version is '0.*'

SELECT unique(version) as thing, count(version) as runs 

asdf test

@dimitropoulos
dimitropoulos / cloudSettings
Last active November 8, 2018 00:55
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-11-08T00:55:19.129Z","extensionVersion":"v3.2.0"}
@dimitropoulos
dimitropoulos / README.md
Last active August 7, 2018 14:50 — forked from jchv/README.md
Installing evdevremapkeys

Open a terminal. (Ctrl+Alt+T)

Become root:

sudo -i

Install the Python package:

Keybase proof

I hereby claim:

  • I am dimitropoulos on github.
  • I am mitropoulos (https://keybase.io/mitropoulos) on keybase.
  • I have a public key ASBI_ka5ZWVyodQzFZA3EdePZDVY2X_RLz8grMsg5X-lYwo

To claim this, I am signing this object: