Skip to content

Instantly share code, notes, and snippets.

@morphykuffour
morphykuffour / install-nix-no-root.sh
Created November 2, 2022 03:44 — forked from jfroche/install-nix-no-root.sh
Nix install without root access
function install_nix() {
set -x
local -r bindir="${HOME}/bin"
local -r proot_url="https://github.com/proot-me/proot/releases/download/v5.3.0/proot-v5.3.0-x86_64-static"
local -r nixdir="${HOME}/mnt/nix"
local -r nixver="2.5.1"
local -r arch="x86_64"
local -r os="linux"
local -r nix_url="https://releases.nixos.org/nix/nix-${nixver}/nix-${nixver}-${arch}-${os}.tar.xz"
local -r nix_cli_dir=nix-${nixver}-${arch}-${os}
@morphykuffour
morphykuffour / LXCBindMount.md
Created January 8, 2022 15:45 — forked from ajmassi/LXCBindMount.md
Create a bind mount from a Proxmox host on an unprivileged lxc container

Proxmox Assign Bind Mount To Unprivileged Container

In order for the LXC container to have full access the proxmox host directory, a subgid is set as owner of a host directory, and an ACL is used to ensure permissions.

Bind Mount dataset to LXC

Add the following line to /etc/pve/lxc/<CT_ID>.conf

mp0:/mount/point/on/host,mp=/mount/point/on/lxc

Create group on host

In the default Proxmox configuration, unpriviliged container subgids will have the prefix "10" followed by the expected 4-digit gid.

@morphykuffour
morphykuffour / gpgcheatsheet.txt
Created September 6, 2021 18:01
gpg-cheatsheet.txt
- Create a GPG public and private key interactively:
gpg --full-generate-key
gpg --export -a "$USER" | xclip -sel clip
@morphykuffour
morphykuffour / suckless.sh
Last active September 6, 2021 15:30
Install Luke Smith's dwm fork on ubuntu
# Install needed dependencies
sudo apt install build-essential sharutils suckless-tools stterm libx11-dev libxinerama-dev libxft-dev libx11-xcb-dev libxcb-res0-dev xcb x11-xkb-utils libxkbcommon-x11-dev
# And then build libxft-bgra # https://github.com/uditkarode/libxft-bgra
mkdir -p ~/build;
cd ~/build;
git clone https://github.com/uditkarode/libxft-bgra
cd libxft-bgra
sh autogen.sh --sysconfdir=/etc --prefix=/usr --mandir=/usr/share/man
sudo make install
@morphykuffour
morphykuffour / i3-swallow.py
Created August 16, 2021 21:40 — forked from windwp/i3-swallow.py
i3-swallow used to swallow a terminal window in i3
#!/usr/bin/env python3
#-----------------------------------------------
# used to swallow a terminal window in i3
#
# INSTALL
# Install python 3 and install i3ipc libary
# pip3 install i3ipc
# download this scrript and put it to your i3 config folder and run
Windows Config // ahk config
<> TileHelper.ahk
ahk << EOF
;=-=-=-=-=-=-=-=-=-
; Per-App Configs
;=-=-=-=-=-=-=-=-=-
@morphykuffour
morphykuffour / WindowsNotesREADME.md
Created July 4, 2021 15:32
WindowsNotesREADME.md

tiny AHK-Based Window helper, to maximize productivity. the default keybinds are :

  • Alt + w to resize and move window to top-half.

  • Alt + x to resize and move window to bottom-half.

  • Alt + s to resize and move window to full center.

  • Alt + a to resize and move window to left-half.

  • Alt + d to resize and move window to right-half.

  • Ctrl + Alt + Space to toggle taskbar

Bash Loading Order
# The bash executable
/bin/bash
# The systemwide initialization file, executed for login shells
/etc/profile
# The personal initialization file, executed for login shells
~/.bash_profile