Skip to content

Instantly share code, notes, and snippets.

View WyriHaximus's full-sized avatar
🐉
Breathing Fire

Cees-Jan Kiewiet WyriHaximus

🐉
Breathing Fire
View GitHub Profile
@fjctp
fjctp / README.md
Last active February 13, 2024 01:18
RPi Zero W kiosk

Summary

Setup RPi Zero W as a kiosk

Step

  1. write Raspbian Lite image to a SD card
  2. enable ssh
touch /boot/ssh
  1. setup WiFi
set -l data_status (curl -s https://iceportal.de/api1/rs/status)
set -l data_trip (curl -s https://iceportal.de/api1/rs/tripInfo/trip)
# next stop
echo  (echo $data_trip | jq -r '([ .trip.stops[] | select(.info.passed==false) ]
| first).station.name')
# train number
echo  (echo $data_trip | jq -r '"\(.trip.trainType)-\(.trip.vzn)"')
# speed
echo speed (echo $data_status | jq -r '"\(.speed) km/h"')
@leodutra
leodutra / -setup-windows-wsl-devenv.md
Last active May 13, 2024 18:30
Install and Setup Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

Setup Windows Subsystem 2 for Linux

Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font

To setup native Linux, see this gist

Preview

Requirements

@AGlass0fMilk
AGlass0fMilk / 99-tb16-dock.rules
Last active May 16, 2020 08:59
Mixed DPI on Ubuntu - Dell XPS 15 9570 and TB16 dock with 4K internal/1080p external displays
# put the following in a udev rule file
# for example /etc/udev/rules.d/99-tb16-dock.rule
ACTION=="add", SUBSYSTEM=="thunderbolt", ATTR{device_name}=="Dell Thunderbolt Dock", RUN+="/bin/systemctl --no-block start configure-tb16-dock.service"
@fnky
fnky / ANSI.md
Last active May 13, 2024 21:40
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
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.
@jdarpinian
jdarpinian / executable.c
Last active March 20, 2024 15:28
Add one line to your C/C++ source to make it executable.
///bin/true;COMPILER_OPTIONS="-g -Wall -Wextra --std=c99 -O1 -fsanitize=address,undefined";THIS_FILE="$(cd "$(dirname "$0")"; pwd -P)/$(basename "$0")";OUT_FILE="/tmp/build-cache/$THIS_FILE";mkdir -p "$(dirname "$OUT_FILE")";test "$THIS_FILE" -ot "$OUT_FILE" || $(which clang || which gcc) $COMPILER_OPTIONS -xc "$THIS_FILE" -o "$OUT_FILE" || exit;exec "$OUT_FILE" "$@"
#include <stdio.h>
int main() {
printf("Hello world!\n");
return 0;
}
@ricjcosme
ricjcosme / dump-restore
Created September 13, 2017 17:33
DUMP / RESTORE PostgreSQL Kubernetes
DUMP
// pod-name name of the postgres pod
// postgres-user database user that is able to access the database
// database-name name of the database
kubectl exec [pod-name] -- bash -c "pg_dump -U [postgres-user] [database-name]" > database.sql
RESTORE
// pod-name name of the postgres pod
// postgres-user database user that is able to access the database
// database-name name of the database
@webframp
webframp / keybase.md
Created July 25, 2017 18:14
Signing git commits on github using keybase.io gpg key

Probably one of the easiest things you'll ever do with gpg

Install Keybase: https://keybase.io/download and Ensure the keybase cli is in your PATH

First get the public key

keybase pgp export | gpg --import

Next get the private key

@nothings
nothings / kotaku_hzd.md
Last active January 23, 2024 15:24
Why Frustum Culling Matters, and Why It's Not Important

There is a nice GIF illustrating a technique called "frustum culling" in this Kotaku article: http://kotaku.com/horizon-zero-dawn-uses-all-sorts-of-clever-tricks-to-lo-1794385026

The interwebs being what they are, this has also led to some controversy.

Some people have interpreted the opening sentence "Every time you move the camera in Horizon Zero Dawn, the game is doing all sorts of under-the-hood calculations, loading and unloading chunks of world to ensure that it all runs properly," as being about the GIF; that's not what frustum culling does, but that's probably not what the article's author meant anyway.