Categories
Uncategorized

Uses

Haven’t written anything here this year yet. Here’s my uses page!

Hardware

My desktop is a custom build that I put together about a year ago (Jan 2023). Here’s the part list on pcpartpicker. It’s super beefy and runs any- and everything with no complaints. Getting to this point was a little painful as the graphics card I bought was open box from Micro Center. After two RMAs, MSI ended up sending me a brand new card.

Important Specs:

  • i9-13900k
  • RTX 4080
  • 64 GB RAM

For a laptop I have a Framework 13. I’ve been super happy with that as an on-the-go device.

My phone is a Pixel 6a. It does the trick, but I’m still angry they removed the headphone jack.

I have a random collection of old laptops and desktops that I’m using as a home proxmox cluster. This site is hosted on one of the computers on that rack.

any homelab folks out there?feeling glad that electricity is relatively cheap here

ben (@benharr.is) 2023-05-15T18:13:12.830Z

For servers, I’m not even sure at this point. I think my wikipage is up to date.

Software

You can find my dotfiles here.

I use Firefox as my browser on all my devices.

I do email in Thunderbird on desktop, and Aqua Mail on my phone.

Most days, I’ll boot into windows 11 on my desktop to remote into my $dayjob development VM (the VMware remote client runs better on windows). I also have a linux dual-boot setup but I hardly bother rebooting to switch. I’ve been playing videogames quite a bit lately and haven’t taken the time to set up linux gaming on the other drive.

My laptop is running Fedora and I’m currently running KDE. GNOME is also fine. Use what you like 🙂

Text editor is vim and/or sublime text. I use Visual Studio and Jetbrains Rider for the C# I do at work.

I use fish shell as my main interactive shell, and some of the most common tools I use are ripgrep, fzf, and a bunch of aliases and shell scripts I’ve built up over the years.

For IRC, I use WeeChat. I’ve written previously about my setup. I use weechat-android on my phone to keep up to date.

Password manager is KeepassXC, and keepassdx on android. I use Syncthing for my files, including my keepass db file, and all the associated files in my pubdir (separate synced dirs).

My phone number is on jmp.chat, so I use XMPP to send and receive SMS. I run the cheogram client on my phone to integrate with the system dialer. On desktop, I tend to SMS from my weechat via bitlbee.

My font of choice is Berkeley Mono, an absolutely fantastic font. Runners up are Input Mono and Jetbrains Mono.

This site is WordPress, but it was previously in several different incarnations, starting from a very old WordPress site, then I switched at some point to bashblog. That grew tiring to deal with once you have more than a handful of posts. I switched to hugo, which I also wrote about. I guess I’m more of a GUI guy than I thought because I ended up going back to WordPress at some point last year.

Since I got deep into pinball over the last couple years, I use Match Play to run the two weekly tournaments here in TC. The tcpinball.org site is also WordPress, and I use the Jetpack plugin to publish new posts on the various social media pages we have for that.

Categories
Uncategorized

git diff-highlight

Diff output from git can be hard to read. Luckily there’s a nice tool bundled with git that can help us out.

Enter diff-highlight, a little perl script found in git’s contrib directory.

From its own documentation:

[diff-highlight] post-processes the line-oriented diff, finds pairs of lines, and highlights the differing segments.

diff-highlight is shipped in a default git install but it needs to be bundled and added to your $PATH. Here’s how to do it on debian:

$ sudo make -C /usr/share/doc/git/contrib/diff-highlight
$ sudo ln -s /usr/share/doc/git/contrib/diff-highlight/diff-highlight /usr/local/bin/

Now you can pipe git’s diff output to to diff-highlight to get a better view of what actually changed.

git diff | diff-highlight

Optionally, you can configure git to use it all the time. Add the following to your ~/.gitconfig:

[pager]
log = diff-highlight | less
show = diff-highlight | less
diff = diff-highlight | less

See the documentation for more usage tips!

Categories
Uncategorized

WordPress with sqlite3

Update: there’s a proposal in WordPress core to merge sqlite support: https://make.wordpress.org/core/2023/04/19/status-update-on-the-sqlite-project/. The recommended way to use sqlite is currently by using the official plugin: https://wordpress.org/plugins/sqlite-database-integration/.


Running WordPress with sqlite is quick, easy, and can be much less system administration load as it eliminates the need for a separate database process.

Here’s how to run WordPress with sqlite using aaemnnosttv’s drop-in.

Set it up

  1. download https://wordpress.org/latest.tar.gz
  2. extract it into your webroot (something like /var/www)
  3. download db.php and add it to /var/www/yoursite/wp-content/
  4. follow the normal setup instructions but skip the database fields
  5. profit????

nginx config

Adjust configs as needed. Here’s an example.

snippets/ssl/benharri.org includes the block from certbot that points to the right cert and key.

server {
  listen 80;
  server_name benharri.org;
  return 307 https://$server_name$request_uri;
}

server {
  listen 443 ssl;
  server_name benharri.org;
  include snippets/ssl/benharri.org;
  index index.php index.html;
  root /var/www/benharri.org;
  client_max_body_size 100M;
  include /var/www/benharri.org/nginx.conf; #w3tc caching

  location / {
    try_files $uri $uri/ /index.php?$args;
  }

  location = /favicon.ico {
    log_not_found off;
    access_log off;
  }

  location ~* wp-config.php {
    deny all;
  }

  location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_intercept_errors on;
    fastcgi_pass unix:/run/php/php8.2-fpm.sock;
  }

  location ~ /\.ht {
    deny all;
  }
}
Categories
Uncategorized

Update Adventures

tl;dr I got bit by an interface naming change (bug?) https://pve.proxmox.com/wiki/Upgrade_from_6.x_to_7.0#Linux_Bridge_MAC-Address_Change. Network didn’t come back up after reboot and I spent a long time figuring it out.


Here’s the longer version about the outage on August 24, 2021:

After finishing the package upgrades on my Proxmox hosts for the new release (Proxmox 7.0, corresponding to Debian 11/bullseye), I typed reboot and pressed enter, crossing my fingers that it would come back up as expected.

It didn’t.

Luckily I had done one last round of VM-level backups before starting the upgrade! I started restoring the backups to one of my other servers, but my authoritative DNS is hosted on the same server as tilde.team, so that needed to happen first.

I got the ns1 set up on my Proxmox node at Hetzner, but my ns2 secondary zones had been hosted at ovh. Time to move those to he.net to get it going again (and move away from a provider-dependent solution).

While shuffling VMs around, I ended up starting a restore of the tilde.team VM on my infra-2 server at OVH. It’s a large VM with two 300gb disks so it would take a while.

I started working to update the DNS records for tilde.team to live on OVH instead of my soyoustart box, but shortly after, I received a mail (in my non-tilde inbox luckily) from the ovh monitoring team that my server had been rebooted into rescue mode after being unpingable for this long.

I was able to log in with the temporary ssh password and update /etc/network/interfaces to use the currently working MAC address that the rescue system was using.

Once I figured out how to disable the netboot rescue mode in the control panel, I hit reboot once more. we’re back up and running on the server that it was on at the start of the day!

ejabberd wasn’t happy with mysql for some reason but everything else seems to have come back up now.

Like usual, holler if you see anything amiss!

Cheers, ~ben

Categories
Uncategorized

Default git branch name

Update:

As of git 2.28, there’s a new configuration option and you don’t need to use the templateDir option:

git config --global init.defaultBranch main

Changing git’s default branch name has come up recently as an easy action we can take to update our language and remove harmful ideas from our daily usage.

I’m concerned that this effort to change the language used is ultimately a symbolic gesture to avoid scrutiny into actual change (notably github’s push for this change and continued contracts with ICE).

However, it’s an easy change to make.

Let’s have a look at how to change it for new repos:

mkdir -p ~/.config/git/template
echo "ref: refs/head/main" > ~/.config/git/template/HEAD
git config --global init.templateDir ~/.config/git/template

Note that you can put this template dir anywhere you like.

You can also set this system-wide (not just for your user) in /usr/share, but note that this might get overridden by package updates.

echo "ref: refs/head/main" | sudo tee /usr/share/git-core/templates/HEAD

The next time you git init, you’ll be on a branch named main.

To change an existing repo, you can use the -m switch of git-branch:

git checkout master
git branch -m master main

Push with -u to your remote if needed and update the default branch in the repo settings in the hosting platform of choice.

It’s a relatively easy change, but don’t kid yourself that it makes any real impact. go protest, donate and sign petitions, and get out there to fix the actual problems.

Categories
Uncategorized

Tools and services

Inspired by tomasino’s recent post, I’d like to detail some of the stuff that I rent and use.

Recurring Costs

Some of these are monthly, others are annual

  • server rental – $135/month, 64gb model, 2yr contract discount
  • proxmox – my preferred hypervisor. I find it useful enough and worth paying the annual license to use the official package mirrors – $80/year
  • domains – includes tilde-related ones and my personal ones (about 10 or so) – about 30 domains totaling $500/year
  • offsite backups at rsync.net – I use the borg offering for a discount since versioning is handled by my backup software – between $60-$70/year

My out of pocket expenses are a little over $2k per year.

Note that I use the server and backups for personal stuff in addition to tilde related things.

The current expenses are totally manageable as is, but if you’ve got some spare cash and want to pitch in towards tilde hosting costs, I have a donate page.

Software I run, use, and maintain

These are all free/open source.

Operating systems

Platforms / software

These are things that I run and maintain for tilde.team and the tildeverse

Our own software

There are also a handful of other sites that we’ve written collaboratively among tildeverse peeps:

See the tildeverse org and team org on tildegit for more projects 🙂

This has diverged a bit from my costs into all the stuff that I do. I suppose that means that the main cost is my time and energy. In general, these things are hands-off in the day-to-day and only take time when there are updates or something breaks.

Categories
Uncategorized

LXD networking and additional IPs

Now that tilde.team is on a fancy-shmancy new dedi server, I’ve tried to get a secondary IP address assigned to a LXD container (which I plan to use for my personal stuff). LXD shows that the secondary IP is being picked up by that container, but I’m still seeing the host machine’s IP as the external address.

I’m not sure how I’ll need to configure the network settings on the host machine (now that we’re running ubuntu 18.04 and it uses netplan for configs and not /etc/network/interfaces). Another confusing thing is that the main config in /etc/netplan says that the network config is handled by systemd-networkd…

At least i have through the end of the year when my current VPS runs out to get this up and running.

Ping me on IRC or email if you have experience with this.

Categories
Uncategorized

Dotfiles

Finally got around to updating my dotfiles to use gnu stow. I adapted ~tomasino’s makefile for use with the configs that I’m keeping with it.

Now I just need to figure out why my ssh config doesn’t copy/symlink my config to ~/.ssh when it already exists.

Categories
Uncategorized

bashblog and your gopherhole

I’ve created a repo for the tilde.team customizations to bashblog.

It will now make sure that your ~/public_gopher exists and symlink your blog into it with a nice gophermap to list all the markdown styled posts.

Try it out and let me know if there are any problems!

Categories
Uncategorized

Phoenix Forum

Inspired by oodsnet, (and my pull request to add darkmode), I started to create my own tilde.team fork (now forum.tilde.team).

The first step was to switch out the css to the tilde.team standard and update the classes for bootstrap. Once I got it going and integrated with the tilde.team linux auth service, I asked other tildeans for input and suggestions.

~micaiah was interested in helping, but also wanted to learn a new language and/or framework, so we decided to start over, recreating the entire forum with elixir/phoenix. We’d discussed elixir previously, but never had a convincing use case to force us to learn it.

The project is live, with the source code on github.

The thing that I’m most impressed with is the speed of the erlang runtime 😀

Give it a look, and join the tilde.team if you want to come hang out!

Update: This didn’t get much use at the time and I didn’t want to maintain it any longer. Source code is archived on tildegit.