Skip to content

Instantly share code, notes, and snippets.

View lynzrand's full-sized avatar

Rynco Maekawa lynzrand

View GitHub Profile
@re-xyr
re-xyr / private-build-plans.toml
Last active March 15, 2025 01:15
Build plans for the "Iosevka Moe" variant of Iosevka.
[buildPlans.IosevkaMoe]
family = "Iosevka Moe"
spacing = "normal"
serifs = "sans"
noCvSs = true
exportGlyphNames = false
[buildPlans.IosevkaMoe.variants.design]
two = "straight-neck-serifless"
four = "closed-serifless"
@YodaEmbedding
YodaEmbedding / .clang-format
Last active April 27, 2025 20:19
.clang-format for Rust style (rustfmt)
AccessModifierOffset: -2
AlignAfterOpenBracket: BlockIndent # New in v14. For earlier clang-format versions, use AlwaysBreak instead.
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: DontAlign
AlignOperands: false
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
@miguelmota
miguelmota / fingerprint.sh
Created March 26, 2021 04:51
SSH generate sha256 fingerprint of public key using ssh-keygen
ssh-keygen -lf ~/.ssh/id_rsa.pub -E sha256
# output:
# 3072 SHA256:dxQGxpXYbvfa6mk2I3XC17aT3jh6gbF7YPsOwusHGpU user@linux (RSA)
@luismts
luismts / GitCommitBestPractices.md
Last active April 24, 2025 04:55
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@F21
F21 / signing-gpg-keys.md
Last active April 12, 2025 16:10
Signing someone's GPG key

This is a quick guide of the commands we use to sign someone's GPG key in a virtual key signing party.

Note: The steps cover only the technical aspects of signing someone's key. Before signing someone's key, you must verify their identity. This is usually done by showing government-issued ID and confirming the key's fingerprint

The commands will work for both GPG and GPG2.

I use Julian's key for the examples. His key id is 2AD3FAE3. You should substitute with the appropriate key id when running the commands.

Signing the key

  1. List the keys currently in your keyring: gpg --list-keys.
@shafik
shafik / WhatIsStrictAliasingAndWhyDoWeCare.md
Last active April 26, 2025 00:19
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th

@hibiyasleep
hibiyasleep / GodDrinksJava.java
Last active April 15, 2025 12:34
world.execute(me);
package goddrinksjava;
/**
* The program GodDrinksJava implements an application that
* creates an empty simulated world with no meaning or purpose.
*
* @author momocashew
* @lyrics hibiyasleep
*/