-
Add yourself to www-data to view your Nextcloud data on the filesystem
I am working on using [[gotify-cli-for-notifying-me-of-nextcloud-uploads]] and I'll start by running the gotify cli as my user so I'll need to be able
#nextcloud #til #tech True -
Lua type hinting - undefined global
I have tons of linting errors in my nvim config, partly because I use Lazyvim plus a set of poorly written customizations that have traveled with me for a while
#lua #til #tech True -
Nostr hex key
you can hexify your [[nostr]] key when you need to sometimes which I needed to for [[postiz]] (link with a thought I'm sure I have on postiz)
#nostr #til #tech True -
Double check your CIDR blocks!
tl;dr Copy paste - don't rely on typing correctly... The Issue I use tailscale at home and generally love it. One thing I use it for is whitelisting - so I
#homelab #tech #tailscale #til True -
Backups are dope
I accidently chown'd -R an app directory and it totally screwed up the database folder. Luckily I zfs replicate my docker volumes to another drive even on
#tech #homelab #zfs #til True -
Aurora U-Blue ZRAM Config
I keep running out of space with my swap getting maxxed out... I don't know why but U-Blue uses Zram already and apparently I can easily override the defau
#infrastructure #infrastructure #tech #til True -
Pandas.DataFrame info always answers and is sometimes right
TIL Today I learned that the `.info()` of a `pandas.DataFrame` will always give you an answer, but it is wildly difficult to know how accurate it is, because it
#python #tech #til True -
SearXNG
I heard about [SearXNG](https://searxng.org) on a couple podcasts and saw it trending on GitHub several times before I finally decided to stand it up. I used i
#homelab #tech #til True -
Grafana + Gotify for push notifications
It's easy to configure push notifications through Gotify from Grafana by setting up a generic `Webhook` Alerting Contact Point... The parameters are: HTTP
#infrastructure #homelab #tech #til True -
Monolith - download and save site as html
TIL: Monolith I needed to save a website earlier and this was just what I needed... https://github.com/Y2Z/monolith
#cli #terminal #til True -
SMB with ZFS on Ubuntu
sudo apt-get install -y samba \\ then set sharesmb=on \\ chown the user \\ smbpasswd <user> -a \\ then mount with user/password from other machine
#zfs #linux #tech #til True -
Using my own domain on nostr
After generating a keypair on a nostr app (I started with primal) I copied my public key to `/.well-known/nostr.json` and put that at the root of my site at `ht
#nostr #til True -
Deployments are not StatefulSets
I was debugging some ArgoCD stuff earlier today and I love using k9s to explore my k8s resources. The TLDR is that I put some bad env vars in the `global` value
#infrastructure #tech #k8s #til True -
docker context (and an issue to question your sanity)
docker contexts are great, would recommend putting them in your prompt though (via starship or something else)... here's why I like to manage my containers
#python #terminal #tech #til True -
Add a healthcheck to your FastAPI app
I'm building a few FastAPI apps to throw in docker and run on my homelab... I wanted to add healthchecks and here's a simple way to do it Make sure to
#python #homelab #tech #til True -
Jellyfin container updates for HWE + AMD
I use LSIO Jelyfin container for the easy addon they provide for AMD GPUs but I couldn't get trickplay to work with HWE... There was almost NOTHING on the
#docker #linux #homelab #til True -
statically.io to help me out
[statically.io](https://statically.io) offers a CDN that I'm going to try to lean into for images in my blog. My hope is that the builds get and stay fast,
#infrastructure #tech #webdev #til True -
D and uninterruptable sleep
Htop I recently have been having significant home server issues, and that's not the point of this - today I learned what `D` state is when looking at htop.
#linux #zfs #tech #til True -
rsync like a pro
I am moving a hefty amount of data to a new ZFS pool due to some corruption and I want to avoid using `zfs send/recv` for this just to make sure I don't pr
#linux #terminal #cli #til True -
hostnamectl to easily change hostname
hostnamectl is apparently a linux utility for easily changing your hostname in a variety of ways I learned there's transient and static hostnames, so that&
#linux #terminal #homelab #cli #til True -
Stylus for custom webpage themes
the Logos web app is DISGUSTINGY bright/white - enough to actually ruin your morning... Thankfully there's an extension called [stylus](https://addons.mozi
#tech #logos #til True -
DNS Broke After Reboot - Ubuntu 22.04
I rebooted by server and DNS broke randomly. I have no idea if it was from a kernel update or what but that's the issue with Ubuntu I guess... After much t
#homelab #linux #tech #til True -
Restart KDE Plasma
Plasma shits the bed a little too often on Fedora for me right now but I finally have a quick fix...
#linux #terminal #cli #til True -
OPNSense Bootstrap Recovery
enabling DHCP WAN port (`dhclient <iface>`)- running the bootstrap script - `sh /usr/local/sbin/opnsense-bootstrap`
#infrastructure #homelab #tech #til True -
docker-remote-add
Add from url?? ADD http://example.com/cars.csv /tmp/cars.csv Unpack automatically!? (.tar, .tar.gz, .tgz, .bz2, .tbz2, .txz, .zip) ADD myapp.tar.gz /opt/myapp/
#homelab #linux #tech #til True -
Docker copy and chown
COPY --chown=myuser:mygroup source-file target-file
#linux #homelab #tech #til True -
Upgrading your kernel can F you up... whoops
https://forum.proxmox.com/threads/update-error-with-coral-tpu-drivers.136888/#post-608975 I lost TPU for frigate, this saved me ass
#homelab #linux #tech #til True -
Fonts in VS C**e
Jet Brains has to be specified 'JetBrainsMono Nerd Font Mono'
#vscode #til True -
Customize K9s
To customize k9s use the skins from catppuccin or the ones k9s supplies Then edit your k9s config Other k9s skins are available [here](https://github.com/derail
#cli #homelab #tech #k8s #til True -
Git fetch failing - check your config
I started deploying a website to Cloudflare on a branch called `pages`. Similar to one of the GH Pages deployment patterns. But when my CI was pushing the branc
#cli #git #til True -
Git repo specific SSH Key!
git config --add --local core.sshCommand 'ssh -i <<<PATH_TO_SSH_KEY>>>'
#cli #git #til True -
DHCP Restart to Save Ubuntu 22.04 Server Networking
I moved a computer to a remote location for an off-site backup but when it was powered on it wouldn't show up on any networks. A solution that got me back
#homelab #linux #tech #til True -
Simple Port Forwarding OPNSense
https://forum.opnsense.org/index.php?topic=8783.0
#homelab #tech #til True -
Refresh Nextcloud Groupfolders after messing around on the filesystem
Exec in as www-data and run ./occ groupfolders:scan folder_id -v (the -v to see what it's doing)
#homelab #linux #tech #til True -
lsof to find what's using your filesystem
lsof | grep /tank/nas shows me what is using my nas at any time!
#zfs #homelab #tech #til True -
Changing ZFS key for child datasets of encrypted dataset after migration
➜ pihole sudo zfs load-key -L file:///path/to/.zfs.tank.key tank/encrypted/vms/arch-sandbox ➜ pihole sudo zfs change-key -o keylocation=file:///path/to/.zfs.tan
#zfs #homelab #tech #til True -
Convert Word Doc to PDF with Headless Libreoffice
I've been using paperless-ngx to manage all my documents, but every once in a while I'll get a `.docx` file to deal with... Turns out Libreoffice has
#linux #cli #tech #til True -
FFMPEG 10-bit videos to 8-bit
`ffmpeg -i input.mp4 -map 0 -c:v libx264 -vf format=yuv420p -c:a copy output.mp4`
#cli #homelab #tech #til True -
i3-Like keyboard mapping in Pop_OS
I was introduced to tiling window managers through i3, which I use heavily on one of my machines. I have switched to Pop_OS! at home though, which has a tiling
#linux #tech #til True -
Use non-standard named ssh keys with github
I was getting `(publickey denied)` when trying to push to GH using ssh. When I tested the connection I saw that a bunch of keys in ``~/.ssh/ were being attempte
#linux #cli #tech #til True -
Reminder about ssh-copy-id for SSH and Ansible
`ssh-copy-id -i my.key.pub <hostname probably from tailscale>` this makes sure I can run ansible from my desktop against VMs on my server easily if they
#homelab #linux #tech #til True -
Adding docker daemon.json broke docker
in /lib/systemd/system/docker.service there is an ExecStart command that got placed there when I setup Docker with Ansible - it threw the -H flag which told the
#linux #tech #docker #til True -
suda.vim for sudo access to files
I regularly need to edit system config files - take /etc/sanoid/sanoid.conf as an example... I'll want to play with something but if I don't start Neo
#vim #linux #tech #til True -
Pipe to a pager to preserve console output in SSH session
I'm playing with my ansible playbook in a remote tmux session, and I'm no wiz so I don't know the ins and outs, but I can't scroll up to get
#linux #cli #til True -
Cron for Nextcloud in Docker
AJAX wasn't cutting it, traditional crontab in containers doesn't make much sense to me, webcron is recommended but I don't want to register with
#homelab #docker #tech #til True -
Call basicConfig to get Python log messages in iPython
Logging instead of printing I am trying to adopt `logger.debug` instead of `print` but ran into a confusing thing in ipython during Advent of Code... I riddled
#python #cli #tech #til True -
New lines in Markdown tables
I wanted to break down some long lines in a Markdown table cell to make it look nicer on my blog but \n didn't do anything for me... turns out <br/>
#vim #webdev #tech #til True -
Make a series of directories fast!
mkdir s{1..10} will make directories s1, s2, ... s10 in one command!
#linux #cli #tech #til True -
Case-insensitive search in Vim
/mysearch\c will match mysearch, MYSEARCH, mYSeArCh...
#vim #tech #til True -
Limit zfs list to avoid docker vomit
zfs list has a flag -r, but if you use zfs driver for docker then you'll get flooded with every docker volume in the world. zfs list -r -d N will limit the
#zfs #cli #tech #til True -
Use the right lspsage, you dope!
If you think glepnir/lspsaga.nvim config will work with tali5/lspsaga.nvim installed... you're in for a rude awakening. Double check your forks folks!
#vim #cli #til True -
Don't forget to load XMP!
Bought some DDR4-3600 speed RAM but only seeing 2666? Load up the BIOS, find DRAM config or something similar, and make sure to load the XMP profile to get that
#homelab #linux #tech #til True -
You can embed gifs?!
I learned you can embed gifs and stuch in things other than GH personal pages! So here I'll keep ones I like and might use later
#homelab #webdev #tech #til True -
My PassMark Scores
!!! note "Babyblue v2" !!! note "Venus " !!! note "Hogwarts" !!! note "Server 2 ... Change the name" !!! note "Serv
#homelab #linux #tech #til True -
Suddenly SSH requires a password
ssh -v -i ~/.ssh/id_rsa nic@hogwarts THen we can look at print outs cat /var/log/auth.log also showed me that I had too wide permissions on files in ~/.ssh -&g
#linux #cli #tech #til False -
Quick setup of ZFS encrytped datasets with sane permissions
Assuming you have a pool called `tank`... And assuming you have an encrypted dataset (See [Jim Saltar's short intro](https://arstechnica.com/gadgets/2021/0
#zfs #homelab #tech #til True -
Check Your BIOS Version On Ubuntu
sudo dmidecode -s bios-version
#linux #cli #tech #til True -
Append string to list of files with xarg
❯ find . -name "requirements.in" -print0 | xargs -0 sh -c 'for arg in "$@"; do echo "awscli" >>"$arg"; done
#linux #bash #til True -
Destroying Tmux sessions with fzf
I use Tmux and Vim for most of my workflow, but I end up with a lot of dangling tmux sessions that dont' really need to persist... but killing them one at
#cli #bash #tech #til True -
Trick to login to web server on another box on lan
TODO: change title - add --listen or --host or something as 0.0.0.0... that way it listens not on localhost or 127.0.0.1, but on all addresses!
#homelab #cli #tech #til False -
Check your SMART status with smartctl
https://www.simplified.guide/linux/disk-health-check Install For ubuntu/debian based distros (which is what I primarly use presently) `sudo apt update -y &&
#cli #linux #tech #til True -
Playing with mdformat
#python #vim #tech #til False -
Paperless-NGX filtering on IDs instead of values
To filter for saved views from the admin console you have to use the `id` of the tag you are using to filter on... Ex: filtering for tags "Inbox" does
#homelab #tech #til True -
Mounting exFAT USB in Linux
Steps `sudo fdisk -l` then look for the device and partition get the Type column mount Example
#linux #homelab #tech #til True -
Xrdp-Authentication-Required-To-Create-Managed-Color-Device
I just need to RDP into an Ubuntu box via Remmina and everytime I login I have to authenticate to create a color managed device... which I don't even know
#homelab #tech #til True -
ZFS Permissions for Sanoid/Syncoid
`zfs allow -u $USER clone,load-key,create,destroy,mount,mountpoint,receive,send,rollback,compression,snapshot,hold,keylocation,bookmark tank` load-key only need
#zfs #homelab #cli #til True -
Setup KVM to boot from local PXE server
Assuming you have a PXE server running you only need small edits to the virt-manager config
#homelab #linux #tech #til False -
cheat on your man
`man` can be a pain to read... and there's lots of alternatives out there and one I've just started playing with is [cheat](https://github.com/cheat/c
#linux #cli #tech #til True -
Reset SSH key passphrase
I got into a pickle where I encrypted the ssh keys I use for my SSH connections on LAN, but then I couldn't run my ansible playbook on my server! ssh-keyge
#homelab #cli #linux #til True -
Add colored indicators to your dataframes html representation
[Mike Driscoll](https://twitter.com/driscollis) recently tweeted about making colored out with pandas DataFrames and I just had to try it for myself Use Case Fi
#python #data #tech #til True -
Samba on Ubuntu 22 needs "inherit permissions" set
see samba config on hogwarts
#homelab #linux #tech #til False -
Filtering emails with core utils
#linux #cli #tech #til True -
Reindex Nextcloud After Adding Data via CLI
My Nextcloud woes I wrote [here]("nextcloud-permissions-with-zfs-and-ansible-nas") about setting up `www-data` as the owner of any directories you wan
#homelab #linux #tech #til True -
arr client config
TIL that when setting up download clients for radarr/sonarr/lidarr/readarr/bazarr/prowlarr that you can utilize internal DNS and instead of hardcoding an IP add
#homelab #tech #til True -
Add space to your LVM on Ubuntu
I ran out of space on the SSD in my server when doing some file transfers but only 100GB was used of a 256 GB SSD? LVM When installing Ubuntu live server the de
#homelab #linux #tech #til True -
Tdarr worker nodes share the cache!
When working with tdarr remote nodes, they need to have access not only to the same libraries but also the same transcode cache as the server otherwise the tran
#homelab #tech #til False -
Local DNS with Pi-hole
Spoilers Tailscale is way easier than this... I was doing this local DNS overwrite in Pi-hole before running tailscale and I haven't just totally "kic
#homelab #tech #til True -
Netplan change from Focal to Jammy
I am revamping my home server and bumped myself early up to Jammy Jellyfish... however to my peril I reused my netplan config and after hitting my server with t
#homelab #linux #tech #til True -
Configure bridge network on Ubuntu 22.04 with Netplan
See 02-....yaml in ansible-nas
#homelab #linux #tech #til False -
Nextcloud permissions with ZFS and Ansible-NAS
TL;DR As the nextcloud docs say... if you want to write to an external volume that location has to be writeable by the user/group `www-data` on the host system.
#homelab #zfs #tech #til True -
Remove ZFS Dataset Specific Snapshots
I started my homelab journey being super naive about ZFS and how to manage the filesystem... that bit me in the butt when transfering a ton of files out of fold
#linux #zfs #cli #bash #homelab #til True -
See ZFS snapshot disk usage
As I was cleaning up my NAS recently I noticed that I ran out of storage even though my disk usage looked pretty low... turns out I was keeping a mega-ton of ZF
#zfs #homelab #tech #til True -
Subset a list based on values in another list with itertools.compress
I have list [True, False, False, True] and another list [1, 2, 3, 4] and a use case where I want to filter list 2 based on list 1 to remove values that line up
#python #tech #til False -
Deleting files on remote storage from Ubuntu might not do what you think
From my daily driver Ubuntu machine I often open nautilus, dolphin, etc. and delete a file here or there on my NAS... turns out Ubuntu sends thse file to `.Tras
#linux #cli #tech #til False -
See git history about one file
In vim `G clog %` does a `git clog {current file}`. You get every commit that the target file is apart of (so there might be info in those commits unrelated)
#cli #vim #git #til False -
Filepath Completion in Neovim
I've had `Plug 'hrsh7th/cmp-path'` in my plugins for ever but didn't notice until recently that I wasn't getting any filepath completio
#vim #tech #til True -
Plug Snapshot!
:PlugSnapshot, :w ~/dotfiles/nvim/snapshot.vim... keep your config safe with git!
#vim #tech #til True -
Forms with FastAPI and Jinja
I just started using FastAPI for a home project and needed to pass back a dynamic number of values from a form rendered with jinja... Dynamic Values The jinja t
#python #tech #til False -
Plug-Snapshot-To-Save-Your-Life
If you use vim-plug for managing your vim plugins, do yourself a favor and snapshot your plugins before upgrading! `:PlugSnapshot` creates a vim.snapshot file
#tech #til True -
Python-Eval
TODO
#tech #python #til False -
Dataframe-To-Styled-Html
I wrote up a little on exporting DataFrames to markdown and html [here](/dataframe-to-markdown) But I've been playing with a web app for with lists and whi
#python #tech #til True -
Dataframe-To-Markdown
Pandas `pandas.DataFrame`s are pretty sweet data structures in Python. I do a lot of work with tabular data and one thing I have incorporated into some of that
#python #tech #til True -
Git-Bisect
I try to commit a lot, and I also try to write useful tests appropriate for the scope of work I'm focusing on, but sometimes I drop the ball... Whether by
#git #tech #til True -
Pandas-String-Contains
TL;DR `pandas.Series.str.contains` accepts regular expressions and this is turned on by __default__! Use case We often need to filter pandas DataFrames based on
#python #tech #til True -
Htop
`htop` is a common command line tool for seeing interactive output of your system resource utilization, running processes, etc. I've always been super conf
#til #tech True -
Unpack-Anywhere-With-Star
Unpacking iterables in python with `*` is a pretty handy trick for writing code that is just a tiny bit more pythonic than not. But [@Ned Batchelder](https://tw
#python #tech #til True -
Pipx
`pipx` is a tool I've been using to solve a few problems of mine... pinning formatting tools like `black`, `flake8`, `isort`, etc. to the same version for
#til #python #tech True -
Fx-Json
[fx](https://github.com/antonmedv/fx) is an interactaive JSON viewer for the terminal. It's a simple tool built with Charmcli's Bubble Tea. Installati
#til #tech True -
Typeddict
Type hinting has helped me write code almost as much, if not more, than unit testing. One thing I love is that with complete type hinting you get a lot more out
#til #python #tech True -
File-Length
I have a specific need for counting the number of lines in a file quickly. At work we use S3 for data storage during our Kedro pipeline development, and in the
#linux #tech #til True -
Vim-Spell-Check
__Did you know you can spell check in Vim?!__ What is this magic??? `set: spell spelllang=en_us` Custom words? Sometimes there's things that are words to y
#vim #tech #til True -
Deques
I am working on a project to create a small system monitoring dashboard using the python `psutil` library. The repo is [here](https://github.com/nicpayne713/not
#python #tech #til True -
Skimpy
EDA I work with data a lot, but the nature of my job isn't to dive super deep into a small amount of datasets, I'm often jumping between several proje
#python #homepage #tech #til True -
Pyclean
I like to keep my workspace clean and one thing that I don't personally love looking at is the `__pycache__` directory that pops up after running some code
#python #tech #til True -
Psutil-01
[Mike Driscoll](https://twitter.com/driscollis) has been posting some awesome posts about `psutil` lately. I'm interested in making my own system monitorin
#python #tech #til True -
Mu
If you work with a template for several projects then you might sometimes need to do the same action across all repos. A good example of this is updating a pack
#python #git #tech #til True -
Abstract-Base-Class
ABCMeta I don't do a lot of OOP currently, but I have been on a few heavy OOP projects and this `ABCMeta` and `abstractmethod` from `abc` would've bee
#python #tech #til True -
Python-F-String-Align
I am personally trying to use `logger` instead of `print` in all of my code, however I learned from [@Python-Hub] that you can align printouts using `print` wi
#python #tech #til True -
Python-Builtin-Calendar
Being lazy I almost exclusively use Python for my job and have been eye-balls deep in it for almost 5 years but I really lack in-depth knowledge of builtins. I
#python #tech #til True -
Dataframe-Memory-Usage
I have often wanted to dive into memory usage for pandas DataFrames when it comes to cloud deployment. If I have a python process running on a server at home I
#python #tech #til True -
Adblock-Coverage
I run pi-hole at home for ad blocking and some internal DNS/DHCP handling. __pi hole posts on the way__ One thing I've never put too much thought in is ask
#homelab #til #tech True -
Webservers-And-Indexes
I host a lot of services in my homelab, but they're mostly dockerized applications so I have never had to care much about how content gets served up. Today
#homelab #tech #til True -
Tree
I wanted a quick way to generate an `index.html` for a directory of html files that grows by 1 or 2 files a week. I don't know any html (the files are expo
#linux #tech #til True -
Pandas-Select-Dtypes
On my team we often have to change data types of columns in a `pandas.DataFrame` for a variety of reasons. The main one is it tends to be an artifact of EDA whe
#python #tech #til True -
Git ammend to a commit
After carefully staging only lines related to a specific change and comitting I suddenly realized I missed one... darn, what do I do? Old me would have soft res
#git #tech #til True -
Stow-Target
Check out [stow](/stow) for a brief introduction to `stow` What if I want to stow a package somewhere else? Boom, that's where `-t` comes in... Maybe I don
#bash #linux #tech #til True -
Vim-Auto-Space
I ran into an issue where I had some copy-pasta markdown tables in a docstring but the generator I used to make the table gave me tabs instead of spaces in odd
#vim #tech #til True -
Stow
Stow is a great tool for managing dotfiles. My usage looks like cloning my dotfiles to my home directory, setting some environment variables via a script, then
#bash #linux #tech #til True -
Ubuntu-Static-Ip
Sometimes I need to manually set a static IP of a Linux machine. I generally run the latest version of Ubuntu server in my VMs at home. In Ubuntu 20 I'm ab
#linux #til True