Blog: 2023-10-04: Difference between revisions
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 14: | Line 14: | ||
Now I'm thinking about stenography https://www.youtube.com/watch?v=nRp_1S7cj6A |
Now I'm thinking about stenography https://www.youtube.com/watch?v=nRp_1S7cj6A |
||
---- |
|||
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 |
|||
<pre> |
|||
function _activate_venv --on-variable PWD |
|||
if git root &> /dev/null |
|||
if string-empty $VIRTUAL_ENV && is-dir venv |
|||
source venv/bin/activate.fish |
|||
end |
|||
else |
|||
if not string-empty $VIRTUAL_ENV |
|||
deactivate |
|||
end |
|||
end |
|||
end |
|||
</pre> |
|||
First working gunicorn+nginx using systemd units |
|||
<pre> |
|||
systemd $ cat system/weave.service |
|||
[Unit] |
|||
Description=weave mentorship app |
|||
[Service] |
|||
WorkingDirectory=/home/razzi/forks/weave |
|||
ExecStart=/home/razzi/.local/bin/poetry run gunicorn app:application |
|||
User=razzi |
|||
Group=razzi |
|||
systemd $ pwd |
|||
/etc/systemd |
|||
</pre> |
|||
<pre> |
|||
$ 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. |
|||
# https://www.nginx.com/resources/wiki/start/ |
|||
# ... |
|||
# 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; |
|||
proxy_pass http://127.0.0.1:8000; |
|||
} |
|||
} |
|||
</pre> |
Latest revision as of 21:37, 4 October 2023
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: https://vonheikemen.github.io/devlog/tools/using-vim-abbreviations/
Now I'm thinking about stenography https://www.youtube.com/watch?v=nRp_1S7cj6A
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/activate.fish end else if not string-empty $VIRTUAL_ENV deactivate end end end
First working gunicorn+nginx using systemd units
systemd $ cat system/weave.service [Unit] Description=weave mentorship app [Service] WorkingDirectory=/home/razzi/forks/weave ExecStart=/home/razzi/.local/bin/poetry run gunicorn app:application User=razzi Group=razzi systemd $ pwd /etc/systemd
$ 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. # https://www.nginx.com/resources/wiki/start/ # ... # 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; proxy_pass http://127.0.0.1:8000; } }