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 July 25, 2024 10: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 July 24, 2024 20:04
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 May 4, 2024 15:35
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 July 1, 2024 02:13
Configure Raspberry to be print server with cups and adding HP LaserJet 1020
@rmi1974
rmi1974 / git_annex_useful_commands.md
Last active December 15, 2023 14:15
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:

@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 May 26, 2024 17:49
[SwiftUI] MacEditorTextView - A simple and small NSTextView wrapped by SwiftUI.
/**
* MacEditorTextView
* Copyright (c) Thiago Holanda 2020-2021
* https://twitter.com/tholanda
*
* MIT license
*/
import Combine
import SwiftUI
@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
@Willian-Zhang
Willian-Zhang / tensorflow_1_7_high_sierra_gpu.md
Last active February 2, 2020 01:11 — forked from pavelmalik/tensorflow_1_7_high_sierra_gpu.md
Install Tensorflow 1.7 on macOS High Sierra 10.13.4 with CUDA and stock python

Tensorflow 1.7 with CUDA on macOS High Sierra 10.13.4 for eGPU

Largely based on the Tensorflow 1.6 gist, and Tensorflow 1.7 gist for xcode, this should hopefully simplify things a bit.

Requirements

  • NVIDIA Web-Drivers 387.10.10.10.30.103 for 10.13.4
  • CUDA-Drivers 387.178
  • CUDA 9.1 Toolkit