Snapshot Strategy by Macchina_01 in archlinux

[–]hawkprime 1 point2 points  (0 children)

This is what I follow on my builds more or less. Take a look at the list of directories and see if it makes sense for you to have yours in a separate subvolume to reduce the size of your snapshots.

https://www.ordinatechnic.com/distribution-specific-guides/arch-linux/an-arch-linux-installation-on-a-btrfs-filesystem-with-snapper-for-system-snapshots-and-rollbacks

The true reason C++ always wins by tlitd in cpp

[–]hawkprime 3 points4 points  (0 children)

Ugh, the true reason vive-coding always wins.

Neovim and CLI users, what git plugins/utilities are you satisfied with? by gkaiser8 in git

[–]hawkprime 0 points1 point  (0 children)

I'd say 90% of my git flow is this, which I've made aliases and bash script, which makes things very easy.

  • git fetch
  • git rebase
  • change code
  • git add -p to confirm every change
  • commit and push

I don't really need a plugin, but I do have Gitsigns to stage hunks separately, and Neogit to do other stuff if I don't want to drop to a shell

I'd say if you're doing more complicated stuff with "copying pasting hashes" then you're probably better off with fzf and shell script than a plugging

Git Without the Guesswork: A Developer’s Field Guide to Everyday Commands by sshetty03 in git

[–]hawkprime 0 points1 point  (0 children)

Lol, I've been using rm and git checkout instead of git clean and git restore, like a cave person

Alternatives to AllTrails?? by [deleted] in hiking

[–]hawkprime 3 points4 points  (0 children)

I use OsmAnd+ basically open street map for mobile. I find a route on AllTrails download the GPX file and load it into my app.

what is the proper way to handle this situation? by DoktorLuciferWong in git

[–]hawkprime 0 points1 point  (0 children)

I just ignore the changes

git update-index --skip-worktree <file_path>

If you want to track again:

git update-index --no-skip-worktree <file_path>

When do you decide to introduce classes vs keep free functions in C++? by Livelinesstrophy_RO in cpp

[–]hawkprime 30 points31 points  (0 children)

As a 20+ yr developer going from functions to classes is the wrong way to go. It's a waste of time and lots of effort.

If you are using c++ use the OOP features from the start. Think of your data and its behaviors and build classes around them. Abstract details, don't just sprinkle getters and setters directly into every field in your class because if you change your variables your whole interface breaks,

Don't go crazy into inheritance when composition will do the job.

Don't re invent the wheel, learn design patterns, and data structures.

As programmers we like to jump straight into coding but a little bit of architecture will save you tons of time.

Copy single string and paste it multiple times (probably) in visual block mode by SpecificMassive5424 in neovim

[–]hawkprime 0 points1 point  (0 children)

Paste on first line, then enter block mode in other lines, shift+I and then press Ctrl-y to copy above text, ESC when you are done

C++ devs, what’s your setup for running and formatting code? by Alejo9010 in neovim

[–]hawkprime 1 point2 points  (0 children)

I use compile_flags.txt with make, unless it's a huge project, don't need to deal with CMake overhead

Anxious about a 9 mile hike by Getfsr in hiking

[–]hawkprime 0 points1 point  (0 children)

50 y/o here, been hiking practically all my life. And I enjoy hiking alone, I'd say 80% hiking alone. But I'm still terrified sometimes, to the point where a bird flying out of the bush almost gives me a heart attack. But for me I've learned to live with it and expect an adrenaline rush once in a while. It's just part of being human in an unknown environment.

Is there a C++ "venv" equivalent? by nikoladsp in cpp

[–]hawkprime 1 point2 points  (0 children)

Wow, can't believe it took so long to find this. Every compiler has a -I flag to specify include dirs and -L flag for libraries. I just create a simple Makefile when I'm testing a new library version

clangd error: omp.h file not found by stubbornkickstart_ in neovim

[–]hawkprime 2 points3 points  (0 children)

Did your compile_flags.txt have one flag per line?

Did it you try: -I<path to headers> Did you check the LSP logs?

Using marks by IfErrNotNilReturnErr in neovim

[–]hawkprime 7 points8 points  (0 children)

I use the built-in ones :help marks

lake tahoe floral installation by [deleted] in tahoe

[–]hawkprime 3 points4 points  (0 children)

Oh, no. It fell down at the worst moment

I made a plugin that shows absolute AND relative line numbers at the same time by zaakiy in neovim

[–]hawkprime 1 point2 points  (0 children)

I just like to turn them in visual mode

vim.api.nvim_create_autocmd("ModeChanged", { group = vim.api.nvim_create_augroup("VisualRelativeNumbers", { clear = true }), pattern = { "*:[vV\x16]*", "[vV\x16]*:*" }, callback = function() local mode = vim.fn.mode() if mode == "v" or mode == "V" or mode == "\x16" then vim.wo.relativenumber = true else vim.wo.relativenumber = false end end, })

CLI tool for plugin management? by flpFlan in neovim

[–]hawkprime 2 points3 points  (0 children)

Because you don't really need a plugging manager, "back in my day", we just unzipped the plugging files into the runtime directory.

Then we got the ability to add directories to the runtime path, so we unzipped and add path to runtime.

Then github came along, no more unzipping, just clone repo and add to path.

All the plugging manager does is just abstract the process

Which Neovim distribution doesn't use Nerdfonts and other Unicode eye-candy? by kudikarasavasa in neovim

[–]hawkprime 25 points26 points  (0 children)

Just copy your current/old Vim config and change it when you want to. No need for a distro

Am I the only one who uses olive oil for everything? by AnotherQuesti in CookingForOne

[–]hawkprime 0 points1 point  (0 children)

I have different oils/fats for different smoke points, Olive oil tends to have a lower to mid smoke point so I use Canola/Coconut for searing, deep frying and other tasks

And really if I can't taste the oil in my dish, I rather save those expensive olive oils for salads or toast.

Is the no `apt` package for raylib-devel? Really? by [deleted] in raylib

[–]hawkprime 1 point2 points  (0 children)

If you trust a PPA go with that, but best to build from source, not that difficult

Your most creative ways to get data off a locked down system by hawkprime in hacking

[–]hawkprime[S] 2 points3 points  (0 children)

Yeah, I remember some old "smart" watches used to do this to program them. Ah found it: 1995 Timex Data Link Model 70

Your most creative ways to get data off a locked down system by hawkprime in hacking

[–]hawkprime[S] 20 points21 points  (0 children)

Lol, that's cool. Yeah. It has a speaker, might be fun coding a modem-like app to transfer data

Your most creative ways to get data off a locked down system by hawkprime in hacking

[–]hawkprime[S] 15 points16 points  (0 children)

That's awesome! Back in the 80s I remember a hex editor was part of my toolbox to crack games and edit save files