Skip to content

Instantly share code, notes, and snippets.

View lainiwa's full-sized avatar

lainiwa

View GitHub Profile
@aclarknexient
aclarknexient / ublock.txt
Last active May 20, 2025 21:07
ublock origin hackernews dark mode and narrower comment display
! The following 2 lines are what I use to display news.ycombinator.com
! Limit comments to 70 characters wide, making them easier to read
news.ycombinator.com##.comment:style(max-width: 70ch !important; overflow: hidden !important;)
! Invert the colours of the site, making a dark mode that I like
! `invert(95%)` does most of the work,
! but you can tweak the hue-rotate value to fine tune the colours
news.ycombinator.com##html:style(filter:invert(95%) hue-rotate(200deg); background: white)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ttesmer
ttesmer / AD.hs
Last active October 29, 2024 15:35
Automatic Differentiation in 38 lines of Haskell using Operator Overloading and Dual Numbers. Inspired by conal.net/papers/beautiful-differentiation
{-# LANGUAGE TypeSynonymInstances #-}
data Dual d = D Float d deriving Show
type Float' = Float
diff :: (Dual Float' -> Dual Float') -> Float -> Float'
diff f x = y'
where D y y' = f (D x 1)
class VectorSpace v where
zero :: v
@bmaupin
bmaupin / alternatives-to-katacoda.md
Created August 4, 2022 16:58
Alternatives to Katacoda

O'Reilly bought and shut down katacoda.com 😕

Alternatives:

Site Notes
killercoda.com Seems to be the closest replacement for Katacoda
Play with Docker Just for Docker, requires a free Docker account
Instruqt This looks like more of a solution for vendors than a generally available platform
This is what Red Hat has chosen to replace Katacoda for their interactive tutorials: https://developers.redhat.com/learn#assembly-id-70181
Source code here: https://github.com/openshift-instruqt/instruqt
@rickhull
rickhull / configuration.nix
Last active June 6, 2025 11:11
Prometheus, Grafana, Loki, Promtail on NixOS
# MONITORING: services run on loopback interface
# nginx reverse proxy exposes services to network
# - grafana:3010
# - prometheus:3020
# - loki:3030
# - promtail:3031
# prometheus: port 3020 (8020)
#
services.prometheus = {
# Put it to .github/workflows/stale.yml
name: Close stale issues and pull requests
on:
workflow_dispatch:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
@ashishmaurya
ashishmaurya / kafka-ui.yaml
Created June 27, 2021 18:46
Installing Kafka UI on local k8s cluster
apiVersion: apps/v1
kind: Deployment
metadata:
name: kafka-ui-deployment
labels:
app: kafka-ui
# namespace: mstore
spec:
replicas: 1
selector:
@joepie91
joepie91 / es-modules-are-terrible-actually.md
Last active June 28, 2025 06:58
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

@diyfr
diyfr / teleport.md
Last active July 5, 2022 17:00
Configurer Teleport derrière Traefik

TELEPORT Un PAM open Source pour se connecter à des serveurs via le navigateur

https://goteleport.com/docs/

Serveur Teleport

Il faut ouvrir les ports de 3023 à 3027 sur la console azure

Ajouter dans un compose

version: '3.7'