Using gin with pongo2/v4 or v5 and embedded templates

You’d like to use pongo2/v4 with gin and embed templates with go:embed.

I’m using cobra for my cli parsing and commands.
So

edit cmd/ui.go

ui/templates.go

ui/templates/base.html.twig

ui/templates/layout.html.twig

ui/templates/index.html.twig

and finally run

to download packages

Any questions -> leave a comment

Quasar v2 create re-usable js file with vue3

I had a little problem migrating Quasar v1 to v2. I wanted to have a re-usable (importable) .js file that I could import in every SFC.
This particular case used i18n.

I create a directory lib under the src dir.
Since this .js file was to set the default menu items in every SFC I named it defaultItems.js.
So it lives in src/lib/defaultItems.js

The content of the file

You see a bunch of things.

import { useStore } from 'vuex'
and
import { useI18n } from 'vue-i18n';

Vue3 has this new use* functions that allow for instance vuex to be accessed via useStore() or vue-i18n to be accessed via useI18n() anywhere.

So that’s pretty simple.

You can now import the defaultItems.js file in your SFC.

Of course now that I see this, it’s wrong to store the translated text in the vuex store. Only the references should be stored there and the translation should happen in the display component.
e.g. the label shouldn’t be i18n.t(‘sidebar.home’) but only ‘sidebar.home’ and later do $t() or <v-t> in the component

PcEngines APU4D4 erst 2022

Ich wollte mir gerade ein Board bestellen mit Gehäuse usw. ein PcEngines Apu4d4 (weil die Apu2c4 gibts wohl nicht mehr).
Nichts ist lieferbar. Alles aufverkauft scheinbar, oder wird da gehortet?

Wie war das noch im Kommunismus? Lange Schlangen, keine Produkte verfügbar.
Haben wir darum denselben aufgegeben um nicht nur unfreier zu sein und überwachter sondern im Endeffekt dort anzukommen wo der Kommunismus im negativen Sinn war?

Heute gehört wenigen das meiste statt wie im Kommunismus vielen alles.
Alles kostet Geld im Gegensatz zum Kommunismus – alles ist frei weil ja im Volkseigentum.
Bewegungsfreiheit? Tja ohne Geld kannst du auch nicht reisen, als Hartz4Empfänger must du sogar um Erlaubnis bitten um verreisen zu dürfen.

Wird es nicht Zeit umzuschwenken? Gerade lese ich China hat alle Cryptowährungen für illegal erklärt. BRAVO! Und vor einigen Tagen hat es versprochen keine Kohlekraftwerke mehr zu bauen.
Die machen was in Punkto Klima.
Blöd nur das die Sprache so schwer zu lernen ist.

Discord the Grand Spyware – DISCOver Remote Devices

Nothing on this world is free.

You pay with your information, with exposing the contents of everything on your computer, of running processes, hard disk contents as well as the obvious private chat not being private.

It goes as far as what you speak being analyzed and sold off to advertising companies, yes the actual words. Everything you do is being profiled.

I know for some people it doesn’t matter, especially young people are rather ignorant about the consequences of being permanently monitored but it’s not exclusive to young people. I’m writing young people because when you’re young you feel invincible and confident for the most part. As you age you learn that you’re not and how the world really works. Information is power and people will pay money for power.

Discord is even more dangerous and invasive than Facebook. It’s in your OS, on your phone and it wants your information. The moment you log into discord with their app they know what hardware you use, what processes are running (can’t be turned off) and it will scan your drives in the background.

People were worried about Google/Alphabet or Apple spying on them, Discord takes this to a whole new level.

The old “I have nothing to hide” argument. Ok imagine walking on the street and some random guy says “Show me the contents of your wallet and bags and pockets”. What would you say? “I have nothing to hide”? Doubtful. You’d tell them “No, go away and leave me alone” or “You have no right”.

But that is the same as running Discord. You’re exposing your devices to total strangers and giving them access to your wallet contents and your pocket, virtually.

If that’s fine with you, knock yourself out. After all what alternatives are there? None really. Except hosting your own IRC server and your own mumble server (or other VOIP server).

That’s the sad part of the story. Discord fills a hole that needed to be filled, but wants to know everything about what’s on your machines and everything you talk about, written or spoken.