Skip to content

Instantly share code, notes, and snippets.

View nektro's full-sized avatar
🌻
if you know, you know

Meghan Denny nektro

🌻
if you know, you know
View GitHub Profile
@lobre
lobre / zig_type_system.md
Last active March 15, 2024 20:43
Zig type system illustrated using ascii diagrams

Zig Type System

Zig aims to be a simple language. It is not easy to define what simple exactly means, but zig is also a low-level programming language that aims for c-compatibility. To reach this goal, it needs good semantics in its type system so that developers have a complete toolbox to manipulate data.

So types in zig are composable, but this can become rapidly overwhelming. See those examples. Are you able to understand them at a glance, as soon as you read them?

*const ?u8
?*const u8
*const [2]u8
@digitalknk
digitalknk / framework.nix
Created November 10, 2021 07:35
NixOS Configuration for the Framework Laptop
#
# NixOS Configuration for Framework Laptop
#
{ config, lib, pkgs, modulesPath, ... }:
{
boot.kernelParams = [ "mem_sleep_default=deep" ];
@probonopd
probonopd / Wayland.md
Last active May 3, 2024 23:46
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr

@ZenulAbidin
ZenulAbidin / omega-ascii-sans-upper.txt
Created March 16, 2020 17:15
Omega Neon Sans - uppercase only. Characters are written in Unicode order, Licensed under CC BY-SA 3.0 https://creativecommons.org/licenses/by-sa/3.0/
╔██╗╔██╗╔██╗ ╔██╗╔██╗╔██╗ ╔███████╗ ╔███╗ ╔████╗
║██║║██║║██║╔████████████╗╔██╔██╔══╝╔██╗ ╔███╔╝ ╔██╔╗██
║██║╚══╝╚══╝╚╗██╗╔██╗╔██╔╝╚╗██████╗ ╚══╝╔███╔╝ ╚╗████╝╔█╗
╚══╝ ╔████████████╗ ╚═╗██╗██╗ ╔███╔╝╔██╗╔██╔╗███╔╝
╔██╗ ╚╗██╔╗██╔╗██╔╝╔███████╔╝ ╔███╔╝ ╚══╝╚╗███████╗
╚══╝ ╚══╝╚══╝╚══╝ ╚═══════╝ ╚═══╝ ╚═══════╝
╔███╗ ╔████╗╔████╗ ╔██╔██╗ ╔██╗ ╔███╗
║███║╔██╔══╝╚══╗██╗╔███████╗╔██████╗ ╔███╔╝
╚═══╝║██║ ║██║╚╗██╔██╔╝╚═╗██╔═╝ ╔█████╗ ╔███╔╝
║██║ ║██║ ╚══╝╚═╝ ╚══╝ ╔█╗╚═════╝ ╔███╔╝
@camnw
camnw / mcbedrockascii
Created June 2, 2019 13:18
Minecraft Bedrock Neofetch Ascii
1.
Place all of the lines between the #'s into $HOME/.config/neofetch/bedrock (Don't include the #'s).
#######################################################################################
${c3}██${c4}████████${c3}██${c1}████${c5}██${c1}██${c3}██${c4}████████${c3}██
${c3}████${c1}████████████${c4}██${c1}██████${c5}██${c3}████${c4}██
${c3}██${c5}██${c4}████${c5}██${c4}██████${c1}██${c4}██${c3}██████${c1}██${c3}████
${c3}██${c1}██${c3}██████${c5}██${c3}██${c1}██${c3}████${c4}██████████${c3}██
${c3}██${c1}████${c4}██████████████${c1}██████████${c5}██
${c4}████${c3}██████${c4}██████${c3}██${c5}██${c3}████${c4}████${c5}██${c3}██
${c1}████${c3}██${c2}██${c3}██${c4}██${c1}████${c3}████████${c1}██████${c5}██
@werrpy
werrpy / rgdm-mount.service
Created March 24, 2019 01:13
gdrive plex mount systemd
[Unit]
Description=rclone google drive media mount
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/rclone --config /root/gdrive/config/rclone.conf mount media-remote-secret: /mnt/gdrive-media --allow-non-empty --allow-other --read-only --dir-cache-time 48h --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit 2G --tpslimit 5 --tpslimit-burst 5
ExecStop=/bin/fusermount -quz /mnt/gdrive-media
Restart=on-abort
RestartSec=5
@The-OMG
The-OMG / create_service.sh
Last active July 27, 2019 17:35
Small script for creating Google Cloud Service Accounts
#!/bin/bash
# requires gcloud command line tools
# go to https://cloud.google.com/sdk/docs/quickstarts to get them OR you can install with Node (npm) "npm install --save -g @google-cloud/cloud-sdk"
# max 100 service accounts per project
# run "gcloud init --console-only" first and select a project; run it again to select another project to create more service accounts
# Location of where service account keys will be created
KEYS_DIR=keys
@ohhdemgirls
ohhdemgirls / vpn.md
Created October 9, 2017 19:58 — forked from joepie91/vpn.md
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

(A Russian translation of this article can be found here, contributed by Timur Demin.)

Why not?

==========================
How Software Companies Die
==========================
- Orson Scott Card
The environment that nurtures creative programmers kills management and
marketing types - and vice versa.
Programming is the Great Game. It consumes you, body and soul. When
you're caught up in it, nothing else matters. When you emerge into
@Avaq
Avaq / combinators.js
Last active May 1, 2024 09:38
Common combinators in JavaScript
const I = x => x
const K = x => y => x
const A = f => x => f (x)
const T = x => f => f (x)
const W = f => x => f (x) (x)
const C = f => y => x => f (x) (y)
const B = f => g => x => f (g (x))
const S = f => g => x => f (x) (g (x))
const S_ = f => g => x => f (g (x)) (x)
const S2 = f => g => h => x => f (g (x)) (h (x))