Blog: 2023-10-04

From razwiki
Jump to navigation Jump to search

Cool new abbr

abbr -a --position anywhere -- --ver --version

Wanna get simple typos fixed in a couple places / ways

- vim: doable with iabbrev

- fish: doable with global abbrs

- browser: use browser extension I guess

Here's an article doing some next level stuff with vim abbrs:

Now I'm thinking about stenography

Envisioning a system where I have nodes that are self-contained pieces... or something... then my guides would be implemented by listing all the nodes.

I mean it's all hypermedia anyways.

I could have a UI to link to a specific node, and the nodes would link to their sources, just like the guides would. Many nodes make up a single page, and could even be reused. Though that kind of duplication might confuse readers, so I'd have to be smart about it.

More guides to write: tmux, fpm, python, fish could be split into multiple chapters, and it'd be nice to have some sort of navigation between them.

Wrote this little snippet to automatically activate venvs, haven't committed it, might not end up using it at all

function _activate_venv --on-variable PWD
  if git root &> /dev/null
    if string-empty $VIRTUAL_ENV && is-dir venv
      source venv/bin/
    if not string-empty $VIRTUAL_ENV

First working gunicorn+nginx using systemd units

systemd $ cat system/weave.service
Description=weave mentorship app

ExecStart=/home/razzi/.local/bin/poetry run gunicorn app:application
systemd $ pwd
$ cat /etc/nginx/sites-available/default
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# ...

# Default server configuration
server {
	listen 80 default_server;
	listen [::]:80 default_server;

	root /var/www/html;

	# Add index.php to the list if you are using PHP
	index index.html index.htm index.nginx-debian.html;

	server_name _;

	location / {
		# First attempt to serve request as file, then
		# as directory, then fall back to displaying a 404.
		# try_files $uri $uri/ =404;