<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Other on my docs</title><link>https://docs.tannerr.dev/other/</link><description>Recent content in Other on my docs</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://docs.tannerr.dev/other/index.xml" rel="self" type="application/rss+xml"/><item><title/><link>https://docs.tannerr.dev/other/dono-static-files/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/dono-static-files/</guid><description>I&amp;rsquo;ll create a Hono server for Deno that serves static files.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 import { Hono } from &amp;#34;https://deno.land/x/hono@v4.0.5/mod.ts&amp;#34;; import { serveStatic } from &amp;#34;https://deno.land/x/hono@v4.0.5/middleware.ts&amp;#34;; const app = new Hono(); // Serve static files from the &amp;#39;public&amp;#39; directory app.use(&amp;#39;/static/*&amp;#39;, serveStatic({ root: &amp;#39;./public/&amp;#39; })); // Serve index.html at the root route app.get(&amp;#39;/&amp;#39;, serveStatic({ path: &amp;#39;./public/index.html&amp;#39; })); // Start the server const port = 3000; console.</description></item><item><title/><link>https://docs.tannerr.dev/other/git/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/git/</guid><description>Git # [[dev-notes]] [[github]]
.pyc __pycache__ tmp .env */*.db */*.csv data TODO.md public/d3.min.js public/plot.min.js public/modules/idb.js [[rebase]]
rebase on pull so their are no pointlyess merge commits
git config --list user.email=tannerr.dev@protonmail.com user.name=Tanner Reyons 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 git config --global core.editor &amp;#34;nvim&amp;#34; git branch -m oldname newname git config --global init.</description></item><item><title/><link>https://docs.tannerr.dev/other/go-reading-order/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/go-reading-order/</guid><description>This document gives tips for writing clear, idiomatic Go code. It augments the language specification, the Tour of Go, and How to Write Go Code, all of which you should read first.
Then Effective GO
Language Specification Tour of Go How to Write Go Code Effective Go</description></item><item><title/><link>https://docs.tannerr.dev/other/go/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/go/</guid><description>[[dev-notes]] go strings [[goth (go auth)]] Go reading order [[dev/dir/go_strings]]
Types # bool: a boolean value, either true or false string: a sequence of characters int: a signed integer float64: a floating-point number byte: exactly what it sounds like: 8 bits of data Go&amp;#39;s basic types are bool string int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 uintptr byte // alias for uint8 rune // alias for int32 // represents a Unicode code point float32 float64 complex64 complex128 zero values 0 false &amp;quot;&amp;quot;</description></item><item><title/><link>https://docs.tannerr.dev/other/go_strings/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/go_strings/</guid><description>To concatenate strings in Go (Golang), you can use several methods. Here are the most common ones:
1. Using the + Operator # The simplest way to concatenate two or more strings is by using the + operator.
1 2 3 4 5 6 7 8 9 10 package main import &amp;#34;fmt&amp;#34; func main() { str1 := &amp;#34;Hello, &amp;#34; str2 := &amp;#34;World!&amp;#34; result := str1 + str2 fmt.Println(result) // Output: Hello, World!</description></item><item><title/><link>https://docs.tannerr.dev/other/graphs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/graphs/</guid><description>each one of these you move the a value around
sin waves made out of sin waves
y = sin(ax) + a sin(x)
splash (x-cos(x-a)^2)^2 + (y-sin(y+a)^2)^2 = a
optical illusion? cos(x) &amp;lt;= xa sin(y)
dir strange portal tan(x^2 + y^2) = a
circle made out of sine wave circles x^2 + y^2 = b sin(ax)
affine plane cos(ax-y) = sin(x^2 + by^2)</description></item><item><title/><link>https://docs.tannerr.dev/other/html-boilerplate/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/html-boilerplate/</guid><description>minimal
1 2 3 4 5 6 7 8 9 10 11 &amp;lt;!DOCTYPE html&amp;gt; &amp;lt;html lang=&amp;#34;en&amp;#34;&amp;gt; &amp;lt;head&amp;gt; &amp;lt;meta charset=&amp;#34;UTF-8&amp;#34;&amp;gt; &amp;lt;meta name=&amp;#34;viewport&amp;#34; content=&amp;#34;width=device-width, initial-scale=1.0&amp;#34;&amp;gt; &amp;lt;meta http-equiv=&amp;#34;X-UA-Compatible&amp;#34; content=&amp;#34;ie=edge&amp;#34;&amp;gt; &amp;lt;/head&amp;gt; &amp;lt;body&amp;gt; &amp;lt;h1&amp;gt;Hello world&amp;lt;/h1&amp;gt; &amp;lt;/body&amp;gt; &amp;lt;/html&amp;gt; d3 starter
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 &amp;lt;!</description></item><item><title/><link>https://docs.tannerr.dev/other/html/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/html/</guid><description>[[dev-notes]]
notes # article tag is for items if a tag has a hypen - then it is a web component is definition list, used for key values, term definition - usefule for displaying meta data ?? null coaelescing operator, returns the first defined value link
query selectors
code snippets # 1 &amp;lt;noscript&amp;gt;need javascript enabled...&amp;lt;/noscript&amp;gt; &amp;lt;template shadowmode=&amp;#34;closed&amp;#34;&amp;gt; 1 2 3 &amp;lt;meta http-equiv=&amp;#34;refresh&amp;#34; content=&amp;#34;10&amp;#34; /&amp;gt; &amp;lt;meta name=&amp;#34;darkreader-lock&amp;#34;&amp;gt; &amp;lt;meta name=&amp;#34;color-scheme&amp;#34; content=&amp;#34;light dark&amp;#34;&amp;gt; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 &amp;lt;!</description></item><item><title/><link>https://docs.tannerr.dev/other/html2pdf/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/html2pdf/</guid><description>Is html2pdf Suspicious # As of the latest analysis, the website html2pdf.com appears to be safe to use based on the automated review by Scamadviser.
However, the review tool identified that the website uses registrar facilities also used by many websites with low to very low review scores, which slightly reduces its trust rating. Additionally, the domain name has been registered for several years, generally indicating a more trustworthy site, but it&amp;rsquo;s still important to check for other suspicious attributes.</description></item><item><title/><link>https://docs.tannerr.dev/other/http-cache-controls/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/http-cache-controls/</guid><description> Cache Controls: # max-age no-store no-cache must-revalidate public, private immutable stale-while-revalidate stale-if-error
Other # pragma - old tech expires - old tech vary - for cdns, for language cdns
Heuristic caching # If-Modified-Since ETag/If-None-Match Cache busting
https://www.youtube.com/watch?v=Cy2ZJOBgk84&amp;t=314s
caddyfile syntax
header { Cache-Control no-cache, no-store, must-revalidate Pragma no-cache Expires 0 }</description></item><item><title/><link>https://docs.tannerr.dev/other/install-scripts/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/install-scripts/</guid><description>TODO Bash install script: # All Linux Machines # sudo apt update sudo apt upgrade
Dev machine # kanata docs
rust i3 ?? mutter ??
gh github cli docs
obsidian install
sudo dpkg -i Downloads/obsidian_1.8.10_amd64.deb nvim neovim docs
grep, cmake? &amp;hellip; lsd
go
air tmux?
unattended-upgrade??
node?
or convert astro projects to hugo Pull from github
bashh neovim config bashrc (TODO) append to .bashrc Server # unattended-upgrades
fail2ban
gh github cli docs</description></item><item><title/><link>https://docs.tannerr.dev/other/javascript/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/javascript/</guid><description>[[dev-notes]]
[[print pdf ]]
Notes # you cannot make the connectedCallback of a web component async becuase it doesn&amp;rsquo;t match the function signature of the htmlelement class
you can make an async render() function when using .innerHTML is it dangerous and might allow for XSS, use .textContent
does .textContent sanitize?? data-url html attributes are accessed with .dataset.url in js
attributeChangedCallback(prop, value), web component method
dont forget to import the web component classes in the app.</description></item><item><title/><link>https://docs.tannerr.dev/other/jupyter/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/jupyter/</guid><description>Changing Jupyter Lab Syntax Colors # To change the syntax colors in JupyterLab installed via pip, you need to locate the default themes and the index.css file. These files are typically found in ~/.local/share/jupyter/lab/themes if installed at the user level, or in /usr/share/ if installed system-wide. The colors are defined in the index.css files, specifically within the block for CodeMirror styles, which includes variables like --jp-mirror-editor-keyword-color for keywords and --jp-mirror-editor-string-color for strings</description></item><item><title/><link>https://docs.tannerr.dev/other/keyboard-workflow/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/keyboard-workflow/</guid><description>[[dev-notes]]
Lean into long press
left thumb is for layer (and space maybe, right thumb needs a break)
switch which hand does the layer key, just like shift, even out the work
Be intentional with each movement
jump words (w, e, b) big jumps (11, 22, j k) dont forget super + h or super + l for switching apps
if you limit to just 2 apps on a workspace utilize a+s + j a+s + k for switching workspaces</description></item><item><title/><link>https://docs.tannerr.dev/other/new-dev-stuff/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/new-dev-stuff/</guid><description>[[dev-routes]]
865 syntax episode, listen again…
standards
css scoping starting style dialogue popover anchor streams fetch web req res esm moving out of library and new standards relative color how tf do you center with new thing idk translate, scale and rotate (skew didnt make it) future: css conditionals
is this container dark rate limit
check if too many requests are coming un throttle, decrement time per request create a var in memory per request times before and after req, log time i think hono even showed this graph per user per session?</description></item><item><title/><link>https://docs.tannerr.dev/other/number-format/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/number-format/</guid><description>If you want to prevent Pandas from displaying numbers in scientific notation, you can adjust the display settings. Here are a few methods to achieve this:
Method 1: Set Display Options # You can set the display option for floating-point numbers to a fixed format using the following code:
1 2 3 4 import pandas as pd # Set display option to show float numbers in fixed format pd.set_option(&amp;#39;display.float_format&amp;#39;, &amp;#39;{:.2f}&amp;#39;.format) This will format floating-point numbers to two decimal places.</description></item><item><title/><link>https://docs.tannerr.dev/other/odbc/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/odbc/</guid><description>ODBC = Open Databse Connectivity DSN = Data Source Name
NetSuite ODBC setup # Install driver # download NetSuite ODBC linux driver extract copy to /opt/netsuite sudo apt-get install unixodbc unixodbc-dev copy over the contents of odbc.ini and odbcinst.ini from Netsuite driver installation directory into the files in /etc enable OAuth 2.0, this is preferred over token Ports # Port 1708 needs to be open for outgoing connections
todo? # create Client credentials Flow mapping get the auth string?</description></item><item><title/><link>https://docs.tannerr.dev/other/pip-differences/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/pip-differences/</guid><description>The commands python -m pip install pyodbc and pip install pyodbc are both used to install the pyodbc library, but they differ in how they invoke the pip installer. Here’s a detailed comparison:
Feature python -m pip install pyodbc pip install pyodbc Invocation Method Uses the Python interpreter to run the pip module. Directly calls the pip command. Environment Consistency Ensures that the pip version used corresponds to the specified Python interpreter.</description></item><item><title/><link>https://docs.tannerr.dev/other/postgres/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/postgres/</guid><description>[[dev-notes]]
1 sudo apt install postgresql 1 2 3 4 5 6 #log into psql cli sudo -u postgres psql #psql commands \dt shows tables \q quit 1 2 3 4 5 6 postgres=# ALTER USER postgres PASSWORD &amp;#39;mynewpassword&amp;#39;; CREATE TABLE monies (entry_id serial PRIMARY KEY,date date, amount FLOAT, description VARCHAR(255)); INSERT INTO monies (date, amount, description) VALUES(&amp;#39;11/12/2024&amp;#39;, 444.44, &amp;#39;tanners bday&amp;#39;); 1 2 3 4 5 6 7 pool = new Pool({ host: &amp;#39;localhost&amp;#39;, database: &amp;#39;postgres&amp;#39;, user:&amp;#39;postgres&amp;#39;, password:&amp;#39;mynewpassword&amp;#39;, port: 5432 });</description></item><item><title/><link>https://docs.tannerr.dev/other/print-headers/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/print-headers/</guid><description>Printing HTML Headers and Footers
To create headers for printing HTML pages, you can use CSS to position elements at the top of each page. One approach is to use the position: fixed property to ensure the header appears on every printed page. Here&amp;rsquo;s an example:
1 2 3 &amp;lt;header&amp;gt; &amp;lt;div class=&amp;#34;header&amp;#34;&amp;gt;Your Header Content Here&amp;lt;/div&amp;gt; &amp;lt;/header&amp;gt; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 @media print { header { position: fixed; top: 0; left: 0; right: 0; height: 50px; /* Adjust as needed */ } .</description></item><item><title/><link>https://docs.tannerr.dev/other/python/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/python/</guid><description>[[dev-notes]] [[html2pdf]]
[[pip differences]]
uv # use uv for package and venv features 1 2 3 4 5 6 7 8 9 uv init uv add numpy&amp;gt;=2.0 uv run myscript.py uv run --with jupyter jupyter lab uv sync #import pyproject.toml uv python pin 3.12.9 uvx --from jupyter-core jupyter lab ## quick, ephemoral? pyproject.toml # 1 2 3 4 5 6 7 8 [project] name = &amp;#34;my_project&amp;#34; version = &amp;#34;1.0.0&amp;#34; requires-python = &amp;#34;&amp;gt;=3.</description></item><item><title/><link>https://docs.tannerr.dev/other/rebase/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/rebase/</guid><description>https://git-scm.com/book/en/v2/Git-Branching-Rebasing
Git Rebase Command
To rebase a Git branch onto another branch, you can follow these steps:
Switch to the Source Branch: First, switch to the branch you want to rebase. For example, if you want to rebase feature onto main, you would run:
1 git checkout feature Rebase onto Target Branch: Then, rebase the current branch onto the target branch. You can do this by running:
1 git rebase main Alternatively, you can specify both branches directly:</description></item><item><title/><link>https://docs.tannerr.dev/other/sql/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/sql/</guid><description>[[dev-notes]]
Basic SQL # 1 2 3 4 5 6 7 8 SELECT * FROM testing WHERE id &amp;gt; 1 ORDER BY name LIMIT 1 OFFSET 10 ; 1 2 INSERT INTO Artist (name) VALUES (&amp;#39;Radiohead&amp;#39;); SELECT * from Artist WHERE name = &amp;#39;Radiohead&amp;#39;; 1 2 UPDATE Artist SET name = &amp;#39;Daft Punk&amp;#39; WHERE name = &amp;#39;Radiohead&amp;#39;; SELECT * from Artist WHERE name = &amp;#39;Daft Punk&amp;#39;; 1 UPDATE Artist SET name = &amp;#39;Justice&amp;#39; WHERE name = &amp;#39;Daft Punk&amp;#39; RETURNING *; 1 2 ALTER TABLE table ADD COLUMN image TEXT; ALTER TABLE table DROP COLUMN image TEXT; 1 ALTER TABLE table ADD COLUMN name TEXT NOT NULL DEFAULT &amp;#39;john&amp;#39;; must declare foreign keys on each connection now sqlite will respect foreign keys</description></item><item><title/><link>https://docs.tannerr.dev/other/sqlite/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/sqlite/</guid><description>[[dev-notes]]
Basic SQL # 1 2 3 4 5 6 7 8 SELECT * FROM testing WHERE id &amp;gt; 1 ORDER BY name LIMIT 1 OFFSET 10 ; 1 2 INSERT INTO Artist (name) VALUES (&amp;#39;Radiohead&amp;#39;); SELECT * from Artist WHERE name = &amp;#39;Radiohead&amp;#39;; 1 2 UPDATE Artist SET name = &amp;#39;Daft Punk&amp;#39; WHERE name = &amp;#39;Radiohead&amp;#39;; SELECT * from Artist WHERE name = &amp;#39;Daft Punk&amp;#39;; 1 UPDATE Artist SET name = &amp;#39;Justice&amp;#39; WHERE name = &amp;#39;Daft Punk&amp;#39; RETURNING *; 1 2 ALTER TABLE table ADD COLUMN image TEXT; ALTER TABLE table DROP COLUMN image TEXT; 1 ALTER TABLE table ADD COLUMN name TEXT NOT NULL DEFAULT &amp;#39;john&amp;#39;; must declare foreign keys on each connection now sqlite will respect foreign keys</description></item><item><title/><link>https://docs.tannerr.dev/other/supabase--astro-notes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/supabase--astro-notes/</guid><description>[[supabase]] [[astro]]
I cannot seem to figure out how to have the OTP/magic link log in the user, it always redirects out.
ive done this, and this part (simple auth) works fine: astro supabase docs
i cannot get the magic link to log me in though&amp;hellip;
ive done this supabase ssr docs
for this (magic link docs):
ive changed the email emplate and created an auth/comfirm endpoint where does the function code go?</description></item><item><title/><link>https://docs.tannerr.dev/other/tmux-cheatsheet/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/tmux-cheatsheet/</guid><description>[[tmux]]
Tmux Cheat Sheet Attach and detach BY SETH KENLON opensource.com CC BY-SA 4.0Mastodon fosstodon.org/@osdc
Attach and detach $ tmux Start new tmux session $ tmux attach Attach to tmux session running in the background Ctrl+B d Detach from tmux session, leaving it running in the background Ctrl+B &amp;amp; Exit and quit tmux Ctrl+B ? List all key bindings (press Q to exit help screen)
Window Management Ctrl+B C Create new window Ctrl+B N Move to next window Ctrl+B P Move to previous window Ctrl+B L Move to last window Ctrl+B 0-9 Move to window by index number</description></item><item><title/><link>https://docs.tannerr.dev/other/tmux/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/tmux/</guid><description>[[dev-notes]]
[[Tmux Cheatsheet]]
[[Syntactically correct .tmux.conf]]
1 2 3 4 sudo apt install tmux tmux kill-server tmux kill-window -t &amp;lt;windowname&amp;gt; tmux source-file ~/.tmux.conf Press your tmux prefix key (default is Ctrl+B) followed by : to open the command prompt, then type kill-window and press Enter. Alternatively, you can use Ctrl+B &amp;amp; to kill the current window and confirm with y to really kill the window including all panes within it.</description></item><item><title/><link>https://docs.tannerr.dev/other/web-accessability/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/web-accessability/</guid><description>How do you ensure accessibility in your applications?
Semantic, well structured HTML 72 %
Alternative texts, titles and labels 70.3 %
Styles for active and focused elements 53.6 %
Sufficient color contrast 52.2 %
Keyboard navigability 48.9 %
ARIA landmarks 45.9 %
Reducing animations / distracting elements 25 %
Support for visual impaired people 23.8 %
I don&amp;rsquo;t do accessibility / It&amp;rsquo;s not in my responsibilities 17.2 %</description></item><item><title/><link>https://docs.tannerr.dev/other/web_storage/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.tannerr.dev/other/web_storage/</guid><description> indexeddb # tables are called object stores rows are called objects columns are called keys? generally its a good idea to prefix the table names in IDB</description></item></channel></rss>