Skip to content

Instantly share code, notes, and snippets.

View ooonea's full-sized avatar
🏠
Working from home

ooonea.eth ooonea

🏠
Working from home
View GitHub Profile
@federicocarboni
federicocarboni / layout.ahk
Last active June 1, 2024 09:21
Digita Backtick ` e Tilde ~ su Windows senza Tastierino Numerico
<^>!'::Send `` ; AltGr + ' => `
<^>!vkDD::Send ~ ; AltGr + ì => ~
@ghfields
ghfields / Ubuntu 19.10 zfs installer Encryption
Last active January 7, 2022 22:44
Fix Ubuntu 19.10 zfs installer /usr/share/ubiquity/zsys-setup (encryption)
1) Start in uefi mode.
At Line 216 use:
echo password | zpool create -f \
-o ashift=12 \
-O compression=lz4 \
-O acltype=posixacl \
-O xattr=sa \
-O relatime=on \
@huntrar
huntrar / full-disk-encryption-arch-uefi.md
Last active June 16, 2024 00:36
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.

@todgru
todgru / ufw.md
Created January 6, 2019 21:45
set up ufw to forward requests to port 2222 of server to same server, port 22

Foward requests to one port to another on the same server

I wanted to forward requests comming to a server on port 2222 to the same server port 22.

I'm using ufw for the firewall on the server.

  1. allow port 22 and 2222 on the server.
$ sudo ufw allow 22
@tadly
tadly / rofi-emoji.sh
Last active June 14, 2024 16:40
Rofi emoji picker
#!/usr/bin/env bash
#
# Use rofi to pick emoji because that's what this
# century is about apparently...
#
# Requirements:
# rofi, xsel, xdotool, curl, xmllint
#
# Usage:
# 1. Download all emoji
@fire1ce
fire1ce / oh-my-zsh on openwrt or lede-project.md
Last active April 26, 2024 05:00
Install oh-my-zsh on openwrt/lede-project

Install oh-my-zsh on OpenWrt

Install Requirements Packages

opkg update && opkg install ca-certificates zsh curl git-http

Install oh-my-zsh

@troyfontaine
troyfontaine / 1-setup.md
Last active June 15, 2024 09:10
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@garywoodfine
garywoodfine / pbcopyfy
Last active May 6, 2023 20:22
Simple Script to configure pbcopy like functionality on ubuntu
#!/bin/sh
# Copyright (C) 2009-2017 Three Nine Consulting
# Always good practice to update packages. However ask user if they would like to do so
# For explanation on how this works and why check out https://garywoodfine.com/use-pbcopy-on-ubuntu/
read -p "Do you want to update your package repositories before proceeding ? " -n 1 -r
echo #adding new line
if [[ $REPLY =~ ^[Yy]$ ]]
then
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y
fi
@Necklaces
Necklaces / ufw_vpn_killswitch_tutorial.md
Last active June 2, 2024 05:26
GNU/Linux UFW VPN kill switch tutorial

GNU/Linux UFW VPN kill switch tutorial

This is a quick guide for setting up a kill switch using UFW (Uncomplicated FireWall). It is assumed you are using OpenVPN and optionally Network-Manager with network-manager-openvpn.

1. (Optional) IP Addresses

Before we can start we're going to need the IP address (or the IP addresses) of your VPN so that we can whitelist those later on, write them down. They are obviously going to be different for every VPN and VPNs with multiple servers, so I'll leave this up to you.

2. Install UFW

On some systems UFW is installed and enabled by default (Ubuntu, for example). Installation procedure is going to be different for every distribution of GNU/Linux, but it's usually something like

@jcberthon
jcberthon / networkmanager-wifi-powersave.md
Last active June 12, 2024 17:37
NetworkManager Wi-Fi powersaving configuration

NetworkManager WiFi Power Saving

NetworkManager supports WiFi powersaving but the function is rather undocumented.

From the source code: wifi.powersave can have the following value:

  • NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
  • NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting
  • NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave