Skip to content

Instantly share code, notes, and snippets.

@rsms
rsms / macos-distribution.md
Last active May 13, 2024 22:16
macOS distribution — code signing, notarization, quarantine, distribution vehicles
@181192
181192 / increase_root_fedora.md
Last active May 13, 2024 22:14
How to increase the root partition size on Fedora

How to increase the root partition size on Fedora

Boot up with an Fedora Live USB stick.

  1. Run vgs to check if there's any space:
$ sudo vgs
  VG     #PV #LV #SN Attr   VSize    VFree
  fedora   1   3   0 wz--n- <237.28g    0 
@plembo
plembo / addbr0ubunmcli.md
Last active May 13, 2024 22:14
Add br0 to Ubuntu desktop using nmcli

Add a bridge interface to Ubuntu desktop using nmcli

Had to do this for some advanced networking with KVM, and couldn't figure out how to do it using the Nework Manager gui. Did find an article later that showed how to do it with nmtui, but it's so much easier to record what you did when using the cli.

In the examples below "eth0" is the name of my physical interface. By default on Ubuntu and most distributions that will almost certainly be different, for example: "eno1", "ens1", or "enp2s0".

To see what everything looks like before starting:

@andreibosco
andreibosco / yubikey-windows10.md
Last active May 13, 2024 22:13
Setting up Yubikey with SSH and Git on Windows 10 + Powershell
@jboner
jboner / latency.txt
Last active May 13, 2024 22:12
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@daemonhorn
daemonhorn / Windows_FIDO2_Yubikey_SoloKey_Hello_ssh.md
Last active May 13, 2024 22:11
Setting up Yubikey/Solokey(v2)/Windows Hello for OpenSSH via PIV or FIDO authentication on Windows

Overview

This guide covers using both PIV smartcard and FIDO2 features of your Yubikey, SoloKey(v2), and Windows Hello for SSH authentication in a secure and portable manner. FIDO2 support works with YubiKey, SoloKey(v2), and Windows Hello(biometric:face, biometric:fingerprint, secure-element/pin) with OpenSSH as a relatively new feature which requires updated client and server versions. PIV support has been around with PKCS#11 for many years in the OpenSSH codebase, and is considered a more stable and ubiquitous solution when an applicable PKCS#11 library is available for your platform.

Windows Yubikey for ssh via PIV

Example below assumes that you have a piv key already generated in a yubikey slot the way you want. If you need to generate a new one, read the excellent documentation here: https://developers.yubico.com/PIV/Guides/SSH_with_PIV_and_PKCS11.html and https://support.yubico.com/hc/en-us/articles/360021606180-Using-YubiKey-PIV-with-Windows-native-SSH-client

  • This explains basic configurati
@danilopolani
danilopolani / Controller.php
Created June 29, 2023 09:09
Zendesk webhook signature validation with Laravel
<?php
// $request comes from your Controller method, but you can adjust with whatever framework you use
$signature = $request->header(ZendeskSupport::WEBHOOK_SIGNATURE_HEADER),
$timestamp = $request->header(ZendeskSupport::WEBHOOK_SIGNATURE_TIMESTAMP_HEADER),
$rawBody = $request->getContent();
$computedSignature = base64_encode(hash_hmac(
'sha256',
@parmentf
parmentf / GitCommitEmoji.md
Last active May 13, 2024 22:08
Git Commit message Emoji
@gabriel19913
gabriel19913 / alacritty.yml
Created July 3, 2020 11:44
Alacritty file configuration to work with PowerLine fonts
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
@DragoshDX
DragoshDX / app.css
Created April 30, 2024 07:24
pedro spinner
body {
background: #161616;
margin: 0;
height: 100dvh;
display: grid;
place-content: center center;
}
.spinner {