Tuesday, 16 May 2023

[ubuntu] (Fresh install) boot into grub command line

Problem

grub>

Solution

# please note that grub commandline supports some command expansion using tab key
$ # find the root partition
$ ls
$ # set root partition, e.g.
$ root=(lvm/vg-root)
$ # load existing config file, e.g.
$ configfile /boot/grub/grub.cfg
You now should see the selection dialogue of your grub and can boot. To permanently fix the problem, install a tool and run it. Unfortunately, it is not (yet) part of the distribution. Very sadly, you have to add a personal repository. Either sudo the following commands or execute them as root.
$ sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt update
$ sudo apt install -y boot-repair
$ sudo boot-repair

Thursday, 11 May 2023

[git] Undo pushed but unmerged git commit

Problem

You were a bit hasty and committed and pushed something you should not have, e.g., as it has happened to me, into the wrong branch. Now, you want to undo the commit also in the remote repository, but not loose the changes you made.

Solution

Technically, you want, to my understanding

  1. Make HEAD point to the previous commit.
  2. Clean the index from the wrong commit.
  3. Push to the remote repository.
So, you would want to
  • $ git reset --mixed HEAD~
    where ~ stands for the parent commit, to go back more than commit, issue multiple times. The mixed option is the standard and therewith optional.
  • git push
    And this is the rather tricky part, because git might to refuse. In that case, you have two potentially dangerous options and you might want to double check with
    git help push
    I presume if you are on your own branch and nobody is working on it (as it should be?), you are safe with any of the options. Please don't sue me.
    • --force-with-lease
      This will overwrite the changes others are pushing while you are pushing (at least that is what I have understood).
    • --force
      This will overwrite ALL changes others might have pushed inbetween your wrong commit and this fixing.

Monday, 28 November 2022

[HyperSQL] zlib.error: Error -5 while decompressing data: incomplete or truncated stream

Apparently, versions up to 3.9.8 have a problem with cleaning their own cache. As workaround, delete all the files in the cache directory:
del /f /s %install_direcotry_of_HyperSQL%\cache\*
rm -rf ${install_direcotry_of_HyperSQL}/cache/*

Wednesday, 19 October 2022

[Windoof] OneDrive unable to connect, Exploder crashes

Problem

You have M$ OneDrive and it is supposed to synch with a local folder.

  • The tray icon keeps telling, there is no connection.
  • Neither does it show any context menu, clicking on it.
  • Exploring the folder at some point (not time but location) the exploder crashes. Maybe it does not actually crash, but it tries to sync and does not get a connection timeout. Either way, the system gets rather unusable.

Solution

Well, it is not guaranteed to work, but in my case there was a problem with the file system. As administrator execute

chkdsk /f

Having done so, you need to restart your computer. It will initiate a file system check.

In the likely event this does not help or you just do not want to try it: There is kind of a work around to the crashes (not the lack of synching). Do not use Windoof Exploder and no file manager based on its principles/API/whatsover. Which ones there are I cannot really tell. I know that Q-Dir and FileVoyager behave the same way as the Exploder. On the other hand, file opening dialogs of jEdit (Java application) works as well as FreeCommander XE, TreeSize and 7zip. This holds true for their PortableApps version as of time of writing. I suppose, they do not use the same calls as Exploder.

Monday, 26 September 2022

How to horizontal ellipsis (…)?

From time to time, I want to use the horizontal elipsis character, those three consecutive dots. But how?

  • On Windows you can press [ALT]+([NUM 0], [NUM 1], [NUM 3] and [NUM 3]). 
  • With jEdit Character Map, you find it on the General Punctiation block.

Saturday, 16 July 2022

[Linux] Disable the keyboard joystick

At time, the keyboard joystick goes rampage sending the pointer flying all over the screen - ok, it is more like it makes it creep about. Be it as it may, one can switch of such sticks:
xinput --disable $(xinput --list | grep -F Stick | cut -d "=" -f 2 | cut -d '[' -f 1)

Thursday, 26 May 2022

[tmux] recreate the same session

I often find my self starting a tmux session and recreating the same windows and so on in it again and again. I recon, for me it is easiest to use tmuxp, which is a tmux session manager written in Python. There are others like Tmuxinator and Teamocil, but since they are written in Ruby, but I am fairly familiar with Python only and thus usually have already Python installed on my system, I opt for tmuxp. You can write a shell script too if you like a the third links demonstrates.

Some links

[git] Create a local branch from another branch

From the active branch git checkout -b <LOCAL_BRANCH> From a donator branch git checkout -b <LOCAL_BRANCH> <DONATING_BRANCH...