Skip to content

Instantly share code, notes, and snippets.

View Zorono's full-sized avatar
😌
I may be slow to respond.

John Magdy Lotfy Kamel Zorono

😌
I may be slow to respond.
View GitHub Profile
@yamanidev
yamanidev / nginx-configuration-nextjs.md
Created February 27, 2024 18:06
NGINX configuration for deploying Next.js applications (Pages Router)

NGINX

  1. Configuration for serving static content of a Next.js static export.
  2. Configuration of a reverse proxy for a Next.js server application (SSR/SSG/ISR).

You can follow the guide I wrote on deploying Next.js applications to a VPS using NGINX and PM2: article

@adamarbour
adamarbour / lenovo-z13-voidlinux-install.md
Last active March 16, 2024 22:24
Lenovo z13 Void Linux Field Notes

Void Linux Field Notes (Lenovo z13 Edition)

This contains the notes from my installation of Void Linux onto my Lenovo z13 (gen1) laptop1 with the following specs:

  • AMD Ryzen™ 7 PRO 6860Z
  • 13.3" 2.8K (2880 x 1800) OLED
  • 32 GB LPDDR5 6400MHz
  • Integrated AMD Radeon™ 680M Graphic
  • WiFi 6E 802.11AX
  • WWAN Fibocom L860-GL-16 4G CAT16

Footnotes

  1. https://download.lenovo.com/pccbbs/mobiles_pdf/z13_z16_gen1_hmm_en.pdf

@adulau
adulau / http2-rapid-reset-ddos-attack.md
Last active April 4, 2024 17:59
HTTP/2 Rapid Reset DDoS Attack

Introduction

This Gist aims to centralise the most relevant public sources of information related to the HTTP/2 Rapid Reset vulnerability. This vulnerability has been disclosed jointly by Google, Amazon AWS, and Cloudflare on 10 October 2023 at 12:00 UTC.

Please help us make this page as comprehensive as possible by contributing relevant references, vendor advisories and statements, mitigations, etc.

References

@patillacode
patillacode / cap.sh
Last active November 23, 2023 21:35
#!/bin/bash
################################################################################
# cap - capture your screen
#
# This script allows you to capture your screen on Linux or macOS systems using
# the appropriate tools available on each platform. On Linux, it uses 'slop'
# and 'ffmpeg', while on macOS, it utilizes 'screencapture'. The script prompts
# you to select a desktop area for recording and saves the recording as an MP4/MOV
# file with customizable video quality.
@jpenalbae
jpenalbae / peek.sh
Last active March 19, 2024 16:11
Record desktop area on linux using slop and ffmpeg
#!/bin/bash
# Video Quality
# The range of the CRF scale is 0–51, where 0 is lossless, 23 is the default,
# and 51 is worst quality possible. A lower value generally leads to higher
# quality, and a subjectively sane range is 17–28
QUALITY=28
# check if slop command exists
if ! command -v slop &> /dev/null
@Iwwww
Iwwww / Hiberntation-Arch-LUKS-LVM-Encription-SWAP-Partition.md
Last active March 10, 2024 23:20
Enabling hibernation on Arch Linux with LUKS LVM encryption using a swap partition

Introduction

Enabling hibernation on Arch Linux is a useful feature that allows you to save your current system state to your hard disk and power off your computer. When you turn your computer back on, you can resume from where you left off, which is a great way to save time and improve productivity.

Here is a step-by-step guide on how to enable hibernation on Arch Linux.

My setup

I used this installation instruction.

<!DOCTYPE html>
<html>
<head>
<script>
function readTextFile(file) {
var rawFile = new XMLHttpRequest();
rawFile.open("GET", file, false);
rawFile.onreadystatechange = function() {
if (rawFile.readyState === 4) {
{
"data": [
{
"command": "animate-im6",
"description": "animates an image or image sequence on any X server"
},
{
"command": "animate-im6",
"description": "q16 animates an image or image sequence on any X server"
},
@barezina
barezina / usb-unlock
Last active April 1, 2024 21:57
a script to initramfs that allows for keyfiles on USB drives to be used to unlock 22.04 disks
#!/bin/sh
set -e
file="usbtries.txt"
if [ -e ${file} ]; then
count=$(cat ${file})
else
count=0
fi
@szocsbarni
szocsbarni / install-ubuntu-luks-lvm.md
Last active March 8, 2024 12:58 — forked from superjamie/install-ubuntu-luks-lvm.md
How to install Ubuntu with LUKS Encryption on LVM

How to install Ubuntu with LUKS Encryption on LVM

My work requires us to have full-disk encryption, so these are the steps I use.

The basic idea is to create a LUKS-encrypted partition which is used as an LVM Physical Volume.

The GRUB boot partition isn't encrypted, but everything else is.

These steps tested and working on 22.04 (jammy) and 20.04 (focal). For a target OS of Debian 11, I have used and tested this guide: https://linuxconfig.org/how-to-install-debian-on-an-existing-luks-container