Linux

Posted on
Page
of 47
First Prev
/ 47
  • Yep, it's a feeling smug day as a Linux on the laptop user.

  • OK, which absolute idiot decided that the ~ key and the enter key should be next to one another.

    I am attempting to type

    rm -rf ~/config/nvim/.git
    

    As I hit ~ , my pinkie finger also rolls onto enter!!!!!

    Yep,

    rm -rf ~
    

    OH SHIT.

    I am totally screwed right now.

  • Not for this reason, but I always use a Mac (UK or US/ABC Extended) layout, or US on my Win (WSL) or Linux machines. This just adds to my list of reasons as to why I prefer these layout.

    To your point, I remember one of the first things I learned about Linux and the rm command was to always do a dry/interactive -i run, then press up on your console/shell and change the command because of how destructive it can be. In practice over nearly 20 years, I never gave a sh!t though, but perhaps a reminder why I should.

  • I'm trying to learn how to use terminal to commit to github to then be picked up by a host (via cloudflare pages) to display a very simple static webpage.

    It went ok at first and I was able to do everything to have a simple index.html page with one image and text.

    I tried to update this with a bit more info and in doing so ended up with my repository holding copies of the .cache .config .local directories from my terminal. I now can't get rid of these and even deleting everything in github and cloudflare, moving the local .html .css and .jpg files to a new directory and starting over results in the first push adding all the unwanted stuff to the new repository.

    I'm not even sure it's a Linux problem, more a me problem? It is is fucking annoying and will be an embarrassingly simple fix I'm sure. I think the original mistake was running a command in root not in the directory the working files were in maybe?

    edit: I know I could just upload the files to cloudflare by the browser, but where'd be the learning in doing that?

  • Re: ^ I think this is my solution?

    https://devconnected.com/how-to-remove-files-from-git-commit/

    P.s. At present I'm pretty sure files like .profile are in the cloudflare directory that is holding my website. There doesn't seem to be an easy way to view this e.g. in a tree format, and my only hope is that fixng what is committed to git will prompt their removal from cloudflare... I don't think that'll be the case though so will need to dig further?

    Edit: I appreciate this isn't Linux specific headache now... is there a better thread to ask within?

  • You can create a .gitignore file and add entries to it that tell git to exclude those folders from being tracked in your repo.

    There ought to be a good guide on the first page of Google results for 'gitignore'.

  • It sounds a lot like you created your git repo in your home directory.

  • I did yes, I guess this is git noob shame territory. I never read the instructions.

  • There ought to be a good guide on the first page of Google results for 'gitignore'.

    I'll read this. I guess it'll stop the future push but how to remove the files from cloudflare remains a mystery.

  • Delete it, start again, do git init in the directory with your work in. Don't fart about with trying to ignore everything that shouldn't have been there to begin with.

    Also, be reassured that nobody likes git's command line ui. It's not you, it's the tool.

  • Suspect you also did

    git add .
    

    Which is short hand for all the files in the directory. Get into the habit of running git status before then to see what will get staged.

  • If you included everything in your home directory and pushed it to github, you should consider any keys and passwords in there compromised. .ssh/id_rsa, .aws/config, etc.

    I really hope the repo was private?

  • I really hope the repo was private?

    Yes, thankfully. If those files are on the cloudflare server they should also be secure I'd hope, but equally I'd rather get them off there pronto.

  • Thanks all, the advice given makes sense.

    The Penguin terminal has been used prev to ssh to raspberry pics locally (192.168.etc) so guess they're low risk? I will change the password on my pi.hole pi and the home WiFi just incase.

    Bit embarrassing mistake tbh. It was

    git add . 
    

    I did without thinking.

  • Easy done. Cant tell you how much shit my colleagues push to git without thinking.

  • Reassuring of sorts, ta.

  • I just resurrected my old (OLD) surface pro 3 by installing Endeavour OS, i3wm variant, on it.

    It is now a really nice piece of kit, super snappy and pleasingly portable. The screen is brilliant.

    In other news I just had to reboot my OH's windows work laptop. It took nearly ten minutes, to perform a shutdown and restart. How do people live with these things?

  • They buy new hardware, as they're supposed to once the software updates render their old machine slow and pointless.

  • I'm just about to buy a new Linux laptop with 96GB RAM.

    Ref: https://www.tuxedocomputers.com/en/TUXEDO-InfinityBook-Pro-14-Gen9-INTEL.tuxedo

  • Need some extra grunt for advent of code eh?

    That's a serious piece of kit!

  • Work laptop.

    Back in 2021 I got a Lenovo X1C9 with 32GB RAM, 4 Core / 8 Thread Intel i7-1165G7 @ 2.8GHz, 1TB NVMe.

    It's worked a treat barring a few thermal issues (it has to sit on a laptop cooler on my desk at home as I run it with the lid shut and use external monitors). But I'm regularly having to restart one of Chrome (work) or Firefox (personal) as between them they consume huge chunks of the 32GB RAM.

    Lenovo don't do >32GB on their X1 range and didn't want anything bigger (e.g. T series) from them. Tuxedo do very good Linux compatible laptops and the InfinityBook was well within budget even with it maxed out at 96GB RAM.

    #adventofcode stuff tends to get done on a VM on my ESXi box. Reminds me, will go resurrect that thread (the slack channel at work has just been unarchived...)

  • I am astonished that you can use that much RAM just in a browser.

    My laptop has 32Gb RAM and I only got close to that when I ran a virtualised Hadoop cluster on it.

    Are you using browser based IDEs or something?

  • 3 Slack instances probably do it, Slack is notoriously leaky. Google Docs/Sheets too.

    I've probably got 80-100 tabs open across the two browsers (Firefox and Chrome).

    Firefox's task manager claims it's only using 2GB of memory.

    The top 8 tabs in Chrome are using >200MB each.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Linux

Posted by Avatar for hael @hael

Actions