Skip to content

Instantly share code, notes, and snippets.

View mvanduijker's full-sized avatar
👀
👨‍👩‍👦‍👦 💻 🎸

Mark van Duijker mvanduijker

👀
👨‍👩‍👦‍👦 💻 🎸
  • The Netherlands
View GitHub Profile
@karpathy
karpathy / add_to_zshrc.sh
Created August 25, 2024 20:43
Git Commit Message AI
# -----------------------------------------------------------------------------
# AI-powered Git Commit Function
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It:
# 1) gets the current staged changed diff
# 2) sends them to an LLM to write the git commit message
# 3) allows you to easily accept, edit, regenerate, cancel
# But - just read and edit the code however you like
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/
gcm() {
#!/usr/bin/env bash
# Abort sign off on any error
set -e
# Start the benchmark timer
SECONDS=0
# Repository introspection
OWNER=$(gh repo view --json owner --jq .owner.login)
@petershaw23
petershaw23 / yt-dlp.sh
Last active April 22, 2023 08:59
yt-dlp command line for archiving in 480p, best codec (av1)
cd /media/pi/1.42.6-25556/yt-dlp/
echo "beginning______________________________________________________________________________"
echo $(date -u)
#LGR
sudo yt-dlp -S "+res:480,ext:mp4,vcodec:av1" --embed-thumbnail --convert-thumbnails jpg --sponsorblock-mark all --embed-metadata --download-archive LGR.txt https://www.youtube.com/c/Lazygamereviews/videos -o '%(channel)s/%(upload_date>%Y-%m-%d ) s%(title)s.%(ext)s' --windows-filenames --trim-filenames 150 --reject-title 'LGR Plays' --embed-subs --sub-langs en --remux-video mkv --playlist-reverse -q
#LGR BLERBS
sudo yt-dlp -S "+res:480,ext:mp4,vcodec:av1" --embed-thumbnail --convert-thumbnails jpg --sponsorblock-mark all --embed-metadata --download-archive LGRBlerbs.txt https://www.youtube.com/c/lgrblerbs/videos -o '%(channel)s/%(upload_date>%Y-%m-%d ) s%(title)s.%(ext)s' --windows-filenames --trim-filenames 150 --embed-subs --sub-langs en --remux-video mkv --playlist-reverse -q
#GAMINGHISTORIAN
@sanketsudake
sanketsudake / kind-kubernetes-metrics-server.md
Last active January 8, 2025 07:40
Running metric-server on Kind Kubernetes

I have created a local Kubernetes cluster with kind. Following are changes you need to get metric-server running on Kind.

Deploy latest metric-server release.

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.5.0/components.yaml

Within existing arguments to metric-server container, you need to add argument --kubelet-insecure-tls.

@sindresorhus
sindresorhus / esm-package.md
Last active February 11, 2025 03:04
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@cfstras
cfstras / mumble-build-m1.sh
Last active November 27, 2024 20:03
Script to compile mumble natively on an M1 Mac (using my branch cfstras/mumble:arm-m1-mac)
#!/bin/bash
# Notes on building Mumble on an M1 mac
set -euo pipefail
ARM=(arch -arm64)
BREW=(
/opt/homebrew/bin/brew
)
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var domStyle = document.createElement("style");
domStyle.append(
'* { color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }\
* * { background-color: rgba(0,255,0,.2) !important; }\
* * * { background-color: rgba(0,0,255,.2) !important; }\
* * * * { background-color: rgba(255,0,255,.2) !important; }\
* * * * * { background-color: rgba(0,255,255,.2) !important; }\
Ik schrijf u in uw hoedanigheid als gegevensbeschermingsfunctionaris voor uw bedrijf.
Door een situatie waarin uw bedrijf mij zonder expliciete toestemming heeft aangemeld voor solliciaties bij bedrijven die geen relevantie houden tot mijn profiel heb ik zorgen over de verwerking van data binnen uw bedrijf.
Ik zou graag willen dat u van meet af aan weet dat ik binnen een maand antwoord verwacht op mijn verzoek, zoals vereist krachtens artikel 12, bij gebreke waarvan ik mijn verzoek zal doorzenden met een klachtbrief aan de bevoegde autoriteiten.
Gelieve het volgende te adviseren:
1. Bevestig mij of mijn persoonlijke gegevens worden verwerkt. Als dit het geval is, geef me dan de categorieën persoonlijke gegevens die u over mij hebt in uw bestanden en databases.
// On PhpStorm, when ussing with laravel mix, for Alias path resolving in components you have to:
// - create a webpack.config.js file separately like:
const path = require('path')
const webpack = require('webpack')
module.exports = {
...
resolve: {
extensions: ['.js', '.json', '.vue'],
@nerdcave
nerdcave / environment.js
Last active May 11, 2021 12:27
PurgeCSS config for Rails 5 and Webpacker (along with Tailwind CSS and Vue.js, in this case)
// first run:
// yarn add glob-all purgecss-webpack-plugin --dev
/*
config/webpack/environment.js
PurgeCSS configuration for Rails 5 + Webpacker + Tailwind CSS + Vue.js
Optionally, put this in production.js if you only want this to apply to production.
For example, your app is large and you want to optimize dev compilation speed.
*/