Skip to content

Instantly share code, notes, and snippets.

@bearoffwork
bearoffwork / 00-README.md
Last active May 20, 2024 07:37
Arch full disk encryption with BTRFS, FIDO2, Secure Boot, rEFInd boot manager

Arch Linux Installation Guide

Tested with Yubikey 5 NFC and Yubikey 5c NFC, but any security key with FIDO2 should work too.

Prepare

  1. Boot into the Arch Linux live ISO.
  2. Change the root password:
passwd
@AppleBoiy
AppleBoiy / alias_eza.md
Last active April 7, 2025 15:26
eza-ls

Alias eza for ls command

Put to shell configure file

first install eza by homebrew

brew install eza

Basic setup

@taichunmin
taichunmin / README.md
Last active March 3, 2024 06:32
Chameleon Ultra Factory Firmware convert from hex by @shallax
@equipter
equipter / SAK Swapping.md
Last active April 24, 2025 23:18
Explaination of Mifare Classic SAK Swapping anti cloning defense

Mifare Classic - SAK Swapping Explained

Term Meaning
WUP-SAK SAK Value found during the Wake up & Anti-collision process, what you would see reported from a basic search.
Vanity SAK SAK Value represented in Block 0 of a Mifare Classic, on legitimate cards this does not inform the value of the WUP-SAK.
Magic Card An illegitimate card capable of changing it's UID; some magic cards are also able to change other values such as ATQA/SAK.
@meeech
meeech / a_help-osx-borked-my-nix.md
Last active March 18, 2025 23:41
Some steps to (hopefully) help you fix your Nix install on OS X after an upgrade.

Apple Borked my Nix!

Ok, so you've had nix (home-manager) working fine. Then Apple tells you it's time to update.

Ok. Reboot. Oops. It has now broken your Nix setup. Here's some stuff to work through. YMMV.

Note: This is what worked for me, who was just using nix + home-manager. The upgrade that I last did that caused all these issues was 12.3.X > 12.4

Useful Links

@supersonictw
supersonictw / PHP 註解規範.md
Last active April 16, 2023 14:23 — forked from angusty/php注释规范
PHP 通用註解寫法

PHP 註解規範

通用註解寫法

一、文件的註解通用樣例(普通程式文件,類文件,函數文件,變量定義文件)

/**
 * XXXXX的文件
 *
@tanthammar
tanthammar / session-timeout-alert-after-livewire-scripts.blade.php
Last active November 23, 2023 11:50
Laravel Livewire Turbolinks Blade component to keep session alive
{{-- You do not need to add this component if you are using the permanent option in the head component --}}
<script>
if (!window.sessionTimerPermanent && window.Livewire) {
window.livewire.hook('afterDomUpdate', startSessionTimer)
}
// if you are on livewire > 1.3.1 and want to avoid the default error alert
// https://github.com/livewire/livewire/pull/1146
window.livewire.onError(statusCode => {
if (statusCode === 419) {
@nd3w
nd3w / install-nginx-mariadb-phpfpm-on-ubuntu-20.04.md
Last active March 19, 2025 01:47
How to Install Nginx, MariaDB, PHP-FPM on Ubuntu 20.04

How to Install Nginx, MariaDB, PHP-FPM on Ubuntu 20.04

This is a way to install and set up Nginx, MariaDB and PHP-FPM on Ubuntu 20.04.

NOTE: This has been prepared for ease of use in mind, not security, mostly in development machine. Please do not use these instructions to setup on a public server environment. Use other proper manuals instead.

First fetch the latest package list of Ubuntu:

$ sudo apt update
@artizirk
artizirk / gnupg_scdaemon.md
Last active April 22, 2025 18:10
OpenPGP SSH access with Yubikey and GnuPG

NB: This document describles a 'Old-School' way of using Yubikey with SSH

Modern OpenSSH has native support for FIDO Authentication. Its much simpler and should also be more stable with less moving parts. OpenSSH also now has support for signing arbitary files witch can be used as replacement of gnupg. Git also supports signing commits/tags with ssh keys.

Pros of FIDO

  • Simpler stack / less moving parts
  • Works directly with ssh, ssh-add and ssh-keygen on most computers
  • Simpler
  • Private key can never leave the FIDO device

Cons of FIDO

@sshymko
sshymko / install_mysql_client.sh
Last active December 17, 2024 21:17
Install MySQL 5.7 client on Amazon Linux 2
#!/bin/sh
sudo yum install -y https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
sudo yum install -y mysql-community-client