Skip to content

Instantly share code, notes, and snippets.

View Mati365's full-sized avatar
馃毀
Work Work Work

Mateusz Bagi艅ski Mati365

馃毀
Work Work Work
View GitHub Profile
@adtac
adtac / Dockerfile
Last active April 7, 2025 15:29
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@nomaster
nomaster / configuration.nix
Last active February 15, 2025 09:37
NixOS Configuration for experimental K3S cluster node
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
@giuseppe998e
giuseppe998e / nixos-btrfs-tmpfs.md
Last active February 26, 2025 10:06
Install NixOS with BTRFS and IN-RAM root

Install NixOS with BTRFS and IN-RAM root

1. Format and partition the hard drive

  1. Create the GPT partition table
    • $ parted /dev/sdX mklabel gpt
  2. Create the UEFI FAT32 partition (which will be /dev/sdXY)
    • $ parted /dev/sdX mkpart esp fat32 1MiB 512MiB
    • $ parted /dev/sdX set 1 esp on
    • $ parted /dev/sdX set 1 boot on
  • $ mkfs.fat -F 32 -n UEFI /dev/sdXY
@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

@skeeto
skeeto / README.md
Last active September 23, 2024 02:16
AI driving simulation
We can't make this file beautiful and searchable because it's too large.
Id,Data,Nick,Pasek,Autor,Tytu艂,Gatunek,Ocena
50801421,2020-07-15 21:55:08,ranunculus,niebieski,Peter Heller,Gwiazdozbi贸r Psa,"Fantastyka, Postapo",7
50799873,2020-07-15 20:30:14,leuler,niebieski,Jason Schreier,"Krew, pot i piksele. Chwalebne i niepokoj膮ce opowie艣ci o tym, jak robi si臋 gry.",literatura faktu,6
50797785,2020-07-15 18:33:25,xandra,r贸偶owy,Martyna Raduchowska,Czarne 艢wiat艂a: 艁zy Mai (tom I) i Spektrum (tom II),cyberpunk/sf/krymina艂,8
50792029,2020-07-15 11:11:02,vivianka,r贸偶owy,Jeff Lindsay,Dekalog Dextera,krymina艂,6
50791721,2020-07-15 10:44:18,vivianka,r贸偶owy,Magda Stachula,W pu艂apce,krymina艂,6
50791493,2020-07-15 10:24:42,TeczkiUkladyAgentury,niebieski,Grzegorz Braun,A nie m贸wi艂em? Koronawirus i III Wojna 艢wiatowa. Czy Polska przetrwa najwi臋kszy globalny kryzys od 100 lat?,publicystyka,
50786203,2020-07-14 23:05:19,konik_polanowy,niebieski,"Zbigniew Lew-Starowicz, Krystyna Romanowska",O rozkoszy,psychologia,5
50782305,2020-07-14 19:36:48,ranunculus,niebieski,Wiktor Noczkin,Lichwiarz,Fantasy,6
5
@liemle3893
liemle3893 / .gitlab-ci.yml
Created April 1, 2020 12:27
Gitlab CI with Nomad
# Disable the Gradle daemon for Continuous Integration servers as correctness
# is usually a priority over speed in CI environments. Using a fresh
# runtime for each build is more reliable since the runtime is completely
# isolated from any previous builds.
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
DOCKER_TLS_CERTDIR: ""
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
@bhouse
bhouse / setup.md
Created January 22, 2020 21:28
YubiKey GPG + GitHub setup

Yubikey + GPG + Github + Keybase

The following guide are steps that can be used to generate GPG keys on a YubiKey, use the gpg keys to sign github commits, and publish the public gpg key to Keybase.

Why is this a good idea?

  1. Generating and storing GPG keys on a YubiKey allows the private key to be protected and ported between physical machines.
  2. Signing git commits adds an extra layer of verification that code changes originated from an trusted source.
  3. Using a YubiKey + touch-to-sign requires a physical presence to use the GPG signing key.
  4. GitHub supports restricting commits to a repo to only those that are signed.
  5. Putting a physical stamp on your code commits invokes a feeling of pride.
@goll
goll / README.md
Last active March 24, 2025 06:19
Docker nftables configuration for Debian 10
@zarv1k
zarv1k / abstract-unique-validator.ts
Last active January 30, 2025 14:26
Unique Validator Example for NestJS
import { ValidationArguments, ValidatorConstraintInterface } from 'class-validator';
import { Connection, EntitySchema, FindConditions, ObjectType } from 'typeorm';
interface UniqueValidationArguments<E> extends ValidationArguments {
constraints: [
ObjectType<E> | EntitySchema<E> | string,
((validationArguments: ValidationArguments) => FindConditions<E>) | keyof E,
];
}