Skip to content

Instantly share code, notes, and snippets.

View skrajewski's full-sized avatar

Szymon Krajewski skrajewski

View GitHub Profile
@joepie91
joepie91 / es-modules-are-terrible-actually.md
Last active April 12, 2025 00:19
ES Modules are terrible, actually

ES Modules are terrible, actually

This post was adapted from an earlier Twitter thread.

It's incredible how many collective developer hours have been wasted on pushing through the turd that is ES Modules (often mistakenly called "ES6 Modules"). Causing a big ecosystem divide and massive tooling support issues, for... well, no reason, really. There are no actual advantages to it. At all.

It looks shiny and new and some libraries use it in their documentation without any explanation, so people assume that it's the new thing that must be used. And then I end up having to explain to them why, unlike CommonJS, it doesn't actually work everywhere yet, and may never do so. For example, you can't import ESM modules from a CommonJS file! (Update: I've released a module that works around this issue.)

And then there's Rollup, which apparently requires ESM to be u

@davidteren
davidteren / nerd_fonts.md
Last active April 24, 2025 06:26
Install Nerd Fonts via Homebrew [updated & fixed]
@connor4312
connor4312 / configuration.yaml
Created February 27, 2021 06:20
Home Assistant docker-compose with zigbee2mqtt
# Add this to your Home Assistant config
mqtt:
broker: localhost
discovery: true
birth_message:
topic: 'hass/status'
payload: 'online'
will_message:
topic: 'hass/status'
@gullyn
gullyn / flappy.html
Last active January 24, 2025 00:41
Flappy bird in 205 bytes (improved!)
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
@bcastellano
bcastellano / raspberry-pi-cups.md
Last active November 19, 2024 11:30
Configure Raspberry to be print server with cups and adding HP LaserJet 1020
@rmi1974
rmi1974 / git_annex_useful_commands.md
Last active March 12, 2025 06:12
Git-annex useful commands #git #git-annex #commandlinefu

Git-annex useful commands

[git-annex][1]

git-annex allows managing files with git, without checking the file contents into git. While that may seem paradoxical, it is useful when dealing with files larger than git can currently easily handle, whether due to limitations in memory, time, or disk space.

Getting content

Get all content from backup remote:

@devnoname120
devnoname120 / My macOS setup.md
Last active April 17, 2025 23:46
My macOS setup

ℹ️ Enable iCloud end-to-end encryption:

  • Nobody knows that, but iCloud actually supports end-to-end encryption (see “Advanced Data Protection for iCloud”) but it's disabled by default. If you care about data privacy, you should turn it on.
    • System settingsApple IDiCloud → Set Advanced Data Protection to On.
    • System settingsApple IDiCloud → Disable Access iCloud Data on the Web.
  • It supports almost all the native Apple apps, with the notable exceptions of iCloud Mail, Contacts, and Calendars. See official data protection matrix for more info.

Table of Contents

@Brianetta
Brianetta / leave_teams.sh
Last active November 29, 2019 12:03
Leave all Keybase teams not listed in the file `kbteams.txt`
#!/bin/bash
TEAMS=kbteams.txt
for unwanted_team in $(
keybase team list-memberships | cut -f 1 -d ' ' | tail -n +2 | grep -v -f <(awk '{print "^" $0 "$"}' $TEAMS)
)
do
echo Leaving team $unwanted_team
keybase team leave $unwanted_team
@unnamedd
unnamedd / MacEditorTextView.swift
Last active April 14, 2025 11:43
[SwiftUI] MacEditorTextView - A simple and small NSTextView wrapped by SwiftUI.
/**
* MacEditorTextView
* Copyright (c) Thiago Holanda 2020-2021
* https://bsky.app/profile/tholanda.com
*
* (the twitter account is now deleted, please, do not try to reach me there)
* https://twitter.com/tholanda
*
* MIT license
*/
@webbertakken
webbertakken / DtoUniqueEntity.php
Last active May 2, 2024 10:21
DataTransferObject-UniqueEntityConstraint
<?php
namespace App\Validator\Constraints;
use Symfony\Component\Validator\Constraint;
/**
* @Annotation
*/
class DtoUniqueEntity extends Constraint