Skip to content

Instantly share code, notes, and snippets.

@rra3b
rra3b / 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
@taichunmin
taichunmin / README.md
Last active March 3, 2024 06:32
Chameleon Ultra Factory Firmware convert from hex by @shallax
@equipter
equipter / SAK Switching.md
Last active February 26, 2024 20:34
Explaination of Mifare Classic SAK Swapping anti cloning defense

Mifare Classic - SAK Swapping Explained

What is SAK Swapping

Behaviour has been observered where some system using Mifare Classic credentials will identify with one SAK (0x08/18) on a basic search (Wake up) but when the block 0 is dumped, the SAK appears to be different (0x88)

This is because the SAK reported on a Wake up is not coming from Block 0 but is instead burned into the card, The SAK in Block 0 is merely a Vanity SAK.

If the dump is loaded onto a Magic Mifare Classic that Mirrors the vanity SAK as the actual SAK on Wake up it will tell the system that the credential is a duplicate & to deny access.

@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 April 8, 2024 10:28
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.

$ sudo apt update

Nginx

@artizirk
artizirk / gnupg_scdaemon.md
Last active June 14, 2024 22:21
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 March 14, 2024 20:10
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
@bericp1
bericp1 / database.php
Created August 28, 2018 22:15
Per-cluster Redis Config For Laravel
<?php
return [
// ...
'redis' => [
'options' => [
// Options can be specified here (with the lowest precedence).
],
@muhozi
muhozi / Laravel-permission.md
Last active May 31, 2024 18:29
Setting proper permissions to laravel directory

Setting up proper permissions to a laravel directory

There are basically two ways to setup your ownership and permissions. Either you give yourself ownership or you make the webserver the owner of all files.

Webserver as owner (the way most people do it):

Assuming www-data is your webserver user.