Skip to content

Instantly share code, notes, and snippets.

View chsxf's full-sized avatar

Christophe SAUVEUR chsxf

View GitHub Profile
@chsxf
chsxf / results.txt
Last active January 9, 2025 19:33
JPEG vs PNG vs AVIF vs WebP Comparison
----
Image: horizon
Original Size: 212798
Dimensions: 1000 x 1000 px
Format: jpeg
Output size: 164895
Format: png
Output size: 1672103
Format: avif
Output size: 148628
@chsxf
chsxf / README.md
Created June 3, 2024 19:08
Steam GPU Stats

In 2021, Steam MAUs were 132 millions. I took the guess it would be about 160 millions in 2024. Then I used the Steam Hardware survey to evaluate how many GPU units were out there based on the percentage of each model. I tried to look for exact sales number for GPUs but never found them. That's the closest estimation I can think of in the gaming segment.

@chsxf
chsxf / .editorconfig
Created March 11, 2024 12:04
EditorConfig for C/C++ in Visual Studio Code
root=true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4
[*.{c,h}]
@chsxf
chsxf / Setup SSH config for an existing repository.md
Last active July 5, 2022 10:56
Setup SSH config for an existing repository

Purpose

This script is useful when you have multiple SSH keys on your system, eventually having several SSH keys tied to different accounts for the same domain.

It makes use of the core.sshCommand git configuration directive to assign a specific SSH key to a repository.

Requirements

The script will look for SSH keys in ~/.ssh

@chsxf
chsxf / Add a submodule and configure it with the correct SSH key.md
Last active April 23, 2022 08:26
Add a submodule and configure it with the correct SSH key

Purpose

This script is useful when you have multiple SSH keys on your system, eventually having several SSH keys tied to different accounts for the same domain.

It makes use of the core.sshCommand git configuration directive to update recursively submodules of a repository.

Requirements

You'll need bash and git installed on your system.

@chsxf
chsxf / Add remote to a git repository and configure it for SSH.md
Created June 27, 2021 13:50
Add remote to a git repository and configure it for SSH

Purpose

This script is useful when you have multiple SSH keys on your system, eventually having several SSH keys tied to different accounts for the same domain.

It makes use of the core.sshCommand git configuration directive to assign a specific SSH key to a repository.

Requirements

The script will look for SSH keys in ~/.ssh

@chsxf
chsxf / Clone a git repository and configure it for SSH.md
Last active April 19, 2021 07:45
Clone a git repository and configure it for SSH

Purpose

This script is useful when you have multiple SSH keys on your system, eventually having several SSH keys tied to different accounts for the same domain.

It makes use of the core.sshCommand git configuration directive to assign a specific SSH key to a repository.

Requirements

The script will look for SSH keys in ~/.ssh

@chsxf
chsxf / Add all SSH keys at once.md
Last active April 26, 2021 08:45
Add all SSH keys at once

Purpose

This script allows you to add all SSH keys from your ~/.ssh folder to the SSH agent at once. It is especially useful when you have several accounts tied to the SSH for the same domain.

Requirements

The script will look for SSH keys in ~/.ssh

You'll also need bash and ssh-add (from OpenSSH or equivalent) installed on your system.

@chsxf
chsxf / Keycode.swift
Created March 6, 2021 18:14 — forked from swillits/Keycodes.swift
Swift Keyboard Keycodes
enum Keycode: UInt16 {
// Layout-independent Keys
// eg.These key codes are always the same key on all layouts.
case returnKey = 0x24
case tab = 0x30
case space = 0x31
case delete = 0x33
case escape = 0x35
case command = 0x37
case shift = 0x38