HN user

Azrathud

5 karma
Posts0
Comments7
View on HN
No posts found.

Not sure if this is relevant but these things have helped me with suppressing appetite in order of commitment/severity:

- Extra protein even a protein powder, egg

- Complex carbs like beans

- No added sugar

- No processed food

...

- Intranasal insulin (diy - i am not diabetic)

- Adderall

I try to go minimal javascript. There are two main ways you can limit javascript: static site generation or a rendering via a backend language.

Solutions

Use a templating engine with a backend language. My goto is jinja. For example you create a nav template and then include that template in your larger templates. You can then render different templates depending on the given route or file.

Alternatively use a static site generator. I use pelican. The static files are generated upon deployment from markdown for content, scss for css, templates for html, etc. There are plugins for using minifiers.

For user specific data, You can give the user a randomly generated session id cookie generated via a backend language. The backend language generates further pages based on information retrieved from the session id cookie. The session id would correspond to state in some database. Async data loading cannot happen without client side javascript.

- Dev tools: Write tests. the backend language would have developer tools such as a debugger. Generally you can run a dev server which allows to to drop a breakpoint upon failure. (backend frameworks can support this) Alternatively, you can change the rendered HTML via a debug flag (for local testing).

For PHP, The HTTP server serves the rendered files from the backend language's application server / module therefore you normally wouldn't be able to directly edit the backend code via a web browser.

Most of the commands there can be replaced with vi keybindings.

That is, set -o vi

You can type that directly into your terminal for use just in one session or in your .bashrc

Type <C-]> or <Esc> just like in vim to escape into "command" mode. Most command mode commands work. E.g. '^' goes to the beginning of the line '$' goes to the end. 'i' sets bash back into insert mode.