Skip to content

Instantly share code, notes, and snippets.

View bouzou4's full-sized avatar

Adam Bouzourene bouzou4

View GitHub Profile
@bouzou4
bouzou4 / directory-print
Last active April 27, 2024 03:00
Concatenates the contents of specified file types into a single file, with headers indicating the source files.
#!/bin/zsh
# Help message function
function show_help() {
cat <<- EOF
Usage: ${0} [OPTIONS] -e EXTENSIONS
Concatenates the contents of specified file types into a single file, with headers indicating the source files.
OPTIONS:
@bouzou4
bouzou4 / home-nas.md
Created April 18, 2024 16:58
Design Document for home NAS setup

Home NAS Setup Design Document

This document outlines the design and specifications for a home NAS (Network Attached Storage) system using the Seagate Business Storage 2-Bay NAS, focusing on RAID configurations, potential use of hybrid setups, and the consideration of ZFS file systems.

1. NAS Device Overview

Seagate Business Storage 2-Bay NAS

Seagate Business Storage 2-Bay NAS

@bouzou4
bouzou4 / home-server-setup-guide.md
Last active June 27, 2023 02:34
Home Server Setup Guide

Home Server Setup Guide/Overview

Adam Bouzourene

This guide provides an overview of the setup process for an Ubuntu home server, including steps for setting up various services and tools to maximize functionality and ease of use.

Prerequisites

Before starting, ensure you have the following:

  • A server with Ubuntu installed.

WSL2 Cheatsheet

WSL2, or Windows Subsystem for Linux 2, allows you to run a full Linux kernel directly on Windows. This powerful feature unlocks a wide range of possibilities, making it possible to run a full-fledged Linux environment on your Windows machine without the need for a dual-boot or virtual machine setup.

Installation and Configuration

Before you can use WSL2, you'll need to install it and configure your system:

Action Command
Enable WSL (from PowerShell as Admin) dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Enable Virtual Machine Platform (from PowerShell as Admin) dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
@bouzou4
bouzou4 / tmux-cheatsheet.md
Created June 9, 2023 19:11
This cheat sheet provides a quick overview of tmux commands, enabling you to manage terminal sessions effectively and boost your productivity. tmux, short for terminal multiplexer, is a valuable tool for running and managing multiple terminal sessions within a single terminal window or remote shell. This guide covers session management, window m…

tmux Cheatsheet

This cheat sheet provides a quick overview of tmux commands, enabling you to manage terminal sessions effectively and boost your productivity. tmux, short for terminal multiplexer, is a valuable tool for running and managing multiple terminal sessions within a single terminal window or remote shell. This guide covers session management, window management, pane management, and other miscellaneous commands to aid in effective tmux utilization.

Session Management

A tmux session is an independent workspace that houses one or multiple windows. Users or shell scripts create sessions, and each session maintains its state independently. They are useful for organizing terminal activities, especially in remote shell scenarios where a dropped connection can disrupt your work. In such a case, tmux sessions remain alive, and you can reattach to them later.

Action Command
.modal-dialog {
width: 100% !important;
}
@bouzou4
bouzou4 / inject.js
Last active January 21, 2022 00:47
(() => {
window.injected = true;
console.log('injected');
setTimeout(() => alert("hello"), 1000);
})();