Skip to content

Instantly share code, notes, and snippets.

View uncomfyhalomacro's full-sized avatar
🇵🇭
Manifesting 🌠

Soc Virnyl S. Estela uncomfyhalomacro

🇵🇭
Manifesting 🌠
View GitHub Profile
# ~/.config/fish/config.fish
# Keybindings
function fish_greeting
fortune | cowsay -f (random choice /usr/share/cows/**cow) | lolcat
end
# fish_vi_key_bindings
# Imports here
starship init fish | source
pyenv init - | source
# Functions here
# ~/.config/fish/functions/rvm.fish
function rvm --description='Ruby enVironment Manager'
# run RVM and capture the resulting environment
set --local env_file (mktemp -t rvm.fish.XXXXXXXXXX)
bash -c 'source ~/.rvm/scripts/rvm; rvm "$@"; status=$?; env > "$0"; exit $status' $env_file $argv
# apply rvm_* and *PATH variables from the captured environment
and eval (grep '^rvm\|^[^=]*PATH|^GEM_HOME' $env_file | grep -v '_clr=' | sed '/^[^=]*PATH/s/:/" "/g; s/^/set -xg /; s/=/ "/; s/$/" ;/; s/(//; s/)//')
# needed under fish >= 2.2.0
@uncomfyhalomacro
uncomfyhalomacro / gist:41ee5a17bcac6ce03ad511affbbd479d
Created October 15, 2020 03:22
Setting Executables From Gem, PIP, etc. in fish
set -Ux fish_user_paths (ruby -e 'print Gem.user_dir')/bin $fish_user_paths # for gems
@uncomfyhalomacro
uncomfyhalomacro / alacritty.yml
Created November 6, 2020 03:03
alacritty config
env:
# TERM variable
TERM: xterm-256color
font:
normal:
family: DaddyTimeMono Nerd Font
style: Book
size: 11
@uncomfyhalomacro
uncomfyhalomacro / Cursors.txt
Created November 12, 2020 07:13
Cursor Shapes and Style
"\e[0 q" # blinking block
"\e[1 q" # blinking block default
"\e[2 q" # steady block cursor
"\e[3 q" # underline blinking cursor
all based below
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
CSI Ps SP q
Set cursor style (DECSCUSR), VT520.
Ps = 0 ⇒ blinking block.
Ps = 1 ⇒ blinking block (default).
@uncomfyhalomacro
uncomfyhalomacro / agardemonstration.jl
Last active February 24, 2021 13:29
How to prepare 5 MSA agar plates for each student (20 students)
### A Pluto.jl notebook ###
# v0.12.20
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local el = $(esc(element))
@uncomfyhalomacro
uncomfyhalomacro / mygrimshot.sh
Last active March 14, 2022 08:04
screenshot something for wayland wlroots
#!/bin/sh
fullscreenshot() {
timestamp="$(date +%m%d%H%M%S)"
save_path="$HOME/Pictures/Screenshots/Screenshot-${timestamp}.png"
wayshot --stdout | swappy -f - -o "${save_path}"
wl-copy < "${save_path}"
if [ -s "${save_path}" ]; then
notify-send --icon="${save_path}" -a "Screenshot" "Full" "Screenshot in ${save_path}"
@uncomfyhalomacro
uncomfyhalomacro / void-install.md
Created November 5, 2021 08:36 — forked from kongkrit/void-install.md
void linux installation on zfs root

Void Linux Root on ZFS Installation - glibc version

Part 1: Create a ZFS-Capable Installation

Create a void installation medium with ZFS (either a virtual hard disk or a USB stick)

Download ISO from here

  • choose void-live-x86_64-YYYYMMDD.iso - as of this writing (2020-03-20) the newest one is void-live-x86_64-20191109.iso
  • tested on VirtualBox 6.1 with the folllowing parameters:
    • system: chipset: ICH9, enable EFI, RAM: 2GB, 2 CPUs, enable nested VT-x/AMD-V
    • 3 SATA hard disks hanging of AHCI controller - 2 for mirror and the other 10GB for temp installation
    • IDE-CD-Rom on IDE PIIX4 controller.
@uncomfyhalomacro
uncomfyhalomacro / launcher.sh
Created November 27, 2021 00:16
Simple launcher with foot
#!/usr/bin/env bash
# Launcher for executables in $PATH
shopt -s lastpipe
source ~/.bashrc
IFS=: read -ra path <<< "$PATH"
IFS=$'\n' read -r -d '' -a desktops <<< "$(find /usr/share/applications/ -name "*.desktop")"
[ -x "$(which flatpak)" ] && IFS=$'\n' read -r -d '' -a flatapps <<< "$(flatpak list --columns=application | tail -n +1)"
#!/bin/sh
# Uses fd - https://github.com/sharkdp/fd
# Uses epub2txt2 - https://github.com/kevinboone/epub2txt2
# Uses pdftotext from poppler
DOC="$HOME/Documents"
export DOC
tmp_pdf_file="$(mktemp)"