zweieuro

joined 2 years ago
[–] zweieuro@lemmy.world 4 points 1 week ago* (last edited 7 hours ago) (1 children)

This advice will seem rather generic but this has worked for me. Background: I've been programming for a good 15 years in various languages and mainly in VSC and veeery long ago in the arduino IDE (I do not want to talk about those dark times).

  1. Get a pet project to try this against. Learning controls for the sake of it, is ... useless. If its just text, there is no intuition or goal. I chose to try and teach myself rust and go through the learnopengl tutorial again and change it to work with miniquad-rs. Maybe pick something you are familiar with! A new language is a rather tall order usually.

  2. Get a functional config and edit it. Personally kickstart.nvim is really nice for generic settings, but their setup of plugins, and especially LSP (language server config) is really hard to read and difficult to parse. My recommendation for setup:

2a. Copy thePrimeagen's config ( https://github.com/ThePrimeagen/init.lua/tree/master ) which he creates with this tutorial: https://www.youtube.com/watch?v=w7i4amO_zaE NOTE: The actual config is using lazy now instead of the plugin manager he has in the tutorial! the broad strokes are the same but e.g. there is no "after" for the plugins and some other details. What he says about general vim config is still correct tho. Also lazy is much simpler, no longer do you need like 20 different packages for each LSP. (edit: found what makes it work on my setup it https://github.com/nvim-lua/kickstart.nvim/blob/6ba2408cdf5eb7a0e4b62c7d6fab63b64dd720f6/init.lua#L487 its mason-tool-installer in kickstart)

2b. Make a subfolder like lua/theprimeagen e.g. lua/$USER.

2c. Comment out this line https://github.com/ThePrimeagen/init.lua/blob/158c9ccd652e5921cc6940205da6ed20776e7cc7/init.lua#L1 and instead require yours.

2d. open .config/nvim in VSCode (yes, it would recommend using something you know to edit)

2e. line by line, file by file, go through the config files and his video and add what you think is interesting. This took me a good 5h (a good days work) to get somewhat done.

2f. Also look at kickstart.nvim! Theprimeagen is a pro at this stuff so he has no descriptions for his keybindings! (Which you can add when you use e.g. vim.keymap.set("n", "<leader>pv", vim.cmd.Ex, { desc = "[p]roject [v]iew"}). ( The [] are just for niceness, no syntactic value). Why does this matter? -> Because kickstart.nvim has a config for the mind-blowingly useful which-key plugin ( https://github.com/nvim-lua/kickstart.nvim/blob/6ba2408cdf5eb7a0e4b62c7d6fab63b64dd720f6/init.lua#L302 ). Which shows hotkeys and their description while you play with em! Really good for learning!

  1. When making your config absolutely ignore anything that is not in the "top 10 things you do in any other editor". E.g. I really only need "go to definition", "go to file" (which is a telescope fuzzy find), "find references" or "rename". ThePrimeagen has really words of wisdom here "If its something you do rarely, fuck automating it, only automate it when its actually worth remembering the hotkey".

  2. In general you want to reduce friction between thinking, clicking and on-screen action. So anything like "oh what if I want to have a hotkey to rename a C++ header file AND its source file in one go" is a good deal too complex. Keep it super simple.

  3. learn how window jumping with stuff like :vsplit works in nvim, it works great!

  4. For Tmux, you only really need whatever this legend says: https://www.youtube.com/watch?v=vtB1J_zCv8I Sidenote: I made my first project a simple Tmux script that is exactly what fireship describes and launches pre-defined sessions. Works great!

  5. learn by doing :D

Struggles:

  • Moving with hjkl is painful at first, but believe me it is goddamn worth it. I deactivated the arrow keys and mouse clicking altogether so I don't accidentally do it. Also you will be using wb and tf mainly anyways! (word, back, to, find).
  • Learning the nvim internal file browser (netrw) is worth it!
  • Lua is nice but I have never used it before doing this a few days ago. After each plugin restart vim and check for any errors. If you copy something outdated or otherwise problematic you want to fail fast instead of end up with a tangled mess of configs that you need to throw out entirely.
  • Editing nvim configs while in nvim is dumb and really annoying. Just do it in VSC or something you are familiar with.

Random misc:

  • Insane plugins: UndoTree (which ThePrimeagen uses)

  • Insane keycombos: e.g. you are somewhere inside of "Some Really long string that you might wanna change or copy". normal mode. vi". -> v-> visual, i -> inside of, " -> whatever you wanna be inside of. It will select the entire string inside the ". Yes i know this is basic but this shit is SO useful. Works with ANY delimiter (afaik) like ([{

  • DuckDuckGo actually is navigate-able with hjkl! Pressing j to go down the results list is really useful. I am using hyprland so ctrl+tab focuses a browser window. Ctrl+t new window. Type in search. Enter. Go up and down down with jk. really nice, no mouse needed.

Links: The entire primeagen playlist: https://www.youtube.com/playlist?list=PLm323Lc7iSW_wuxqmKx_xxNtJC_hJbQ7R

kickstart.nvim: https://github.com/nvim-lua/kickstart.nvim/tree/master

Note: I would share my config but my dotfiles are on my own git server and have sensitive info inside I don't feel like cleaning out

[–] zweieuro@lemmy.world 6 points 1 week ago (5 children)

Tmux + neovim is really great once you get past the learning curve!

[–] zweieuro@lemmy.world 4 points 2 weeks ago

The original recipe that I know does double bake it but there are literally infinite versions depending on who you ask and where in the country.

This is a recipe from a local supermarket chain, but it does the job alright: https://frischgekocht.billa.at/rezept/kaiserschmarrn-mit-zwetschkenroester-BI-27131

Zwetschenröster = sweet plumb ... Marmelade? Hard to describe.

Run the site through google translate and you have a rough idea.any English site I can find has only simplified versions

[–] zweieuro@lemmy.world 12 points 3 weeks ago

I really hope he picked up the avocade seed afterwards...

[–] zweieuro@lemmy.world 7 points 2 months ago

You may be describing something called 'Workload paralysis' which, in short, makes tasks daunting because they seem so hard to start. Usually it 'leads to' procrastination, doing tasks instead that are known and easier.

Doesn't help that modern society tries to make you feel bad for having this parallesis, making it cause this whirlpool of self doubt.

Sadly there is AFAIK only one medicine: start. No matte rhow slowly, no matter how insignificant or pointless it may seem, start. As soon as you spend time doing anything, you will get better at doing it. This counts for all tasks.

[–] zweieuro@lemmy.world 4 points 2 months ago

Wild guess: your VPN may have a kill switch or other policy that either routes all traffic through tunnel OR kills it outright if it attempts to communicate in any other way. Which may include WiFi direct since its (unsure) an IP protocol?

[–] zweieuro@lemmy.world 9 points 2 months ago

No idea where this originally was from, but I saw it under a strip that said: Of course death had to take {president name here} in his sleep, otherwise there would've been a fight!

I think it was Theodor Roosevelt...

[–] zweieuro@lemmy.world 3 points 2 months ago (1 children)

Maybe I Am just reading this wrong, but I have no idea by the description what this is about. Accessibility, yeah sure, but what's that about corners and tunnel vision? The blind community? Tunnel vision is an attention phenomenon, not a vision imperative?

I Am confused

[–] zweieuro@lemmy.world 14 points 10 months ago (1 children)

This is expected behaviour though?

Realisticly, it would be beyond wrong to have every file in ram at all times, or process's every file to any extend when it is not in immediate use or you are in a search field or link/back link Dialog.

Try copy pasting 2GB of data into your vim and you will find it takes quite a while for everything to be pasted. When you drag and drop via the UI in obsidian and you do that with thousands of files, then this is not very surprising to slow your application. Assuming obsidian wants to make the files available as soon as possible, I presume it parses/indexes them immediately one after the other instead of one big block.

My vault is about 1.5k files, all interlinked in some way (ignoring larger pictures or PDFs). Making a new vault and drag and dropping all of them in lags quite a bit for quite a while, but once everything is loaded its fine.

[–] zweieuro@lemmy.world 17 points 10 months ago* (last edited 10 months ago) (2 children)

Oohhh OK, now I get it. I was missing that 'bowl' is short for bowling.

[–] zweieuro@lemmy.world 20 points 10 months ago (8 children)

Non native so maybe it just gets lost, but I don't get it?

Is the error that the possessive 's is missing at 'dogs' ? If so, then its plural... I don't get it ^^'

[–] zweieuro@lemmy.world 3 points 10 months ago

This is infuriating.

34
submitted 10 months ago* (last edited 10 months ago) by zweieuro@lemmy.world to c/selfhosted@lemmy.world
 

Hi!

I am an embedded systems guy so this is new territory for me. I want to be able to host my own userbase somewhere, mainly I just want to figure out how they work. But all i can find are closed solutions that have some amount of pricing or are obscured. I also feel like it'd be wrong to re-write something like this myself.

I've tried googling around a bit but keep getting similar results so I am assuming I am asking the wrong question. What I want: Ideally some kind of dockerized setup where a user can navigate to a website to create an account, which I can then query through php or some other API. Stuff like password reset or stripe would be nice but is secondary as that can most likely be added another way.

I found stuff like usernbase which seems interesting and even includes something like subscriptions, but I'd like to self host it and not rely on something like the AWS.

Ideally I want to get OAUTH2.0 to work as well, to learn how exactly it works.

Any pointers would be greatly appreciated!

44
submitted 1 year ago* (last edited 1 year ago) by zweieuro@lemmy.world to c/selfhosted@lemmy.world
 

Hi! My goal: I want to set up a ~~beamer~~ projector in my flat and connect that to some kind of 'always on' machine with which I can stream (currently Netflix a bit but that really is not a priority as I am thinking of cancelling it) but would also like it to be a torrent client (I have a VPN) to download some media. Though something like popcorn time would also be nice, though that's also something that I would only use behind a vpn for obvious reasons.

I have a pi5 or and some older NUCs hanging around that run well with Ubuntu. I know that something like kodi does not play nice with Netflix (iirc because of drm).

Should I use the pi? Or better an Ubuntu and do the power management best I can myself?

What would you guys say is a good way to try this out?

Edit: TIL I thought beamer is a word that German borrows from English, so I assumed it's the same. Nope, in German 'beamer' has very weird roots (https://de.m.wikipedia.org/wiki/Videoprojektor) so Germany stole an English word 'beam' but it meant project... Weird

 

Hi! With all the stuff going on I want to switch to Firefox. I got incredibly used to the sidebar in Opera Though and really want something similar.

E.g. Having WhatsApp in the side tab and not in the header tabs (so I can't close it accidently) or different t workspaces for different projects has proven incredibly helpful. Also on opera I can open 2 Windows with the same workspace and get different tabs making it really useful for programming.

I've looked around for plugin like that but could only find one where the tabs were also shown on the side and the top.

If anyone could help me here that would be great, I am really on the fence of switching to way land and ff on my machine.

view more: next ›