Posts

New blog location

New blog location

Fixing Microsoft WMI Invalid Class error (For docker desktop install error)

WMIDiag is deprecated, but the following commands seem to fix. cd C:\Windows\System32\WBEM dir /b *.mof *.mfl | findstr /v /i uninstall > moflist.txt & for /F %s in (moflist.txt) do mofcomp %s from:  https://www.virtuallyboring.com/microsoft-wmi-invalid-class-error-0x80041010/ This is needed to fix docker desktop install error: "component communityinstaller.enablefeaturesaction failed: not found"

Ubuntu Tracker Process - high CPU

https://askubuntu.com/questions/1187191/tracker-process-taking-lot-of-cpu

Yarn registry

 https://stackoverflow.com/questions/45998418/how-to-override-global-yarn-registry-for-particular-project

LaTeX fonts

 https://www.overleaf.com/learn/latex/Font_typefaces

Angular SlickGrid and PapaParse

  Angular Slickgrid and Papaparse Notes Unzip the zipped repo cd .\angular-slickgrid-demos-master\ cd .\bootstrap4-demo-with-locales\ yarn install yarn add ngx-papaparse

Starship prompt configuration

 See https://gist.github.com/ryo-ARAKI/48a11585299f9032fa4bda60c9bba593#file-starship-toml-L51

Ubuntu flush DNS cache (22.04)

  sudo resolvectl flush-caches Then, resolvectl statistics should show cache size of 0 and then, nslookup <hostname> should reflect the new,correct IP Address ---------- DNS utils: sudo apt install dnsutils.  Installs nslookup and dig Can also do sudo apt install cifs-utils From:  https://linuxhint.com/flush-dns-cache-ubuntu-22-04/ and  https://linuxhint.com/flush_dns_cache_ubuntu/

Lookup IP address

 Lookup IP address given hostname host -t a hostname

Resume template

$\LaTeX$ resume template Use the following markup for using Sans Serif: \usepackage[scaled]{uarial} \renewcommand*\familydefault{\sfdefault} %% Only if the base font of the document is to be sans serif \usepackage[T1]{fontenc}

Pandoc markdown to latex

pandoc --from=markdown --output=my.tex hello.md --to=latex --standalone

7z command line

 7z command line 7z x ./file.tar.gz # extract .tar.gz and preserve top level directory

Installing Ubuntu on VM

Setting up Ubuntu in VirtualBox 7+ Follow the steps  here  for unattended install. Setup proxy as shown  here : sudo touch /etc/apt/apt.conf.d/proxy.conf sudo vi /etc/apt/apt.conf.d/proxy.conf Acquire::http::Proxy "http://user:password@proxy.server:port/" ; Acquire::http::Proxy "http://user:password@proxy.server:port/" ; Acquire::https::Proxy "http://user:password@proxy.server:port/" ; Add user to sudoers file as shown  here # add user to sudo group # Run as root usermod -aG sudo <username> # To ensure user has sudo privileges, if command returns root, user has sudo privileges sudo whoami # Otherwise add user to sudoers file visudo # At the end of file add the following. Replace <username> with the actual username <username> ALL=(ALL) NOPASSWD:/bin/mkdir,/bin/rmdir Run the following: sudo apt update && sudo apt upgrade -y For  wget  setup: For all users of the system via the /etc/wgetrc or for the user...

Setting up Docker on Ubuntu

Update the apt cache and install curl   sudo apt-get update -y sudo apt install curl   Setup proxy servers in ~/.bashrc        export http_proxy=http://<proxy-server>:<port>      export https_proxy=http://<proxy-server>:<port>   Add GPG key   curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -   Install Docker   sudo apt install docker.io   Setup proxy (instructions from https://docs.docker.com/config/daemon/systemd/#httphttps-proxy )   Create a systemd drop-in directory for the  docker  service:     sudo mkdir -p /etc/systemd/system/docker.service.d   Create a file named /etc/systemd/system/docker.service.d/http-proxy.conf that adds the HTTP_PROXY environment variable:     [Service]   Environment="H...

Docker reference

 Docker run: sudo docker run -t -d --entrypoint "/bin/sh" --mount type=bind,source=${PWD},target=/src test:0.1 Finding the container name: docker ps Docker exec: docker exec <container name> /src/compile.sh docker exec <container name> /src/run.sh

Powershell tips

Edit profile:  nvim $PROFILE # or notepad $PROFILE Refresh environment variables: refreshenv

Simple Qt project compile and run from command line

 https://wiki.qt.io/Getting_Started_on_the_Commandline cd my/dir/hello qmake -project qmake make ./hello

Linux check dependencies of binary

 https://stackoverflow.com/questions/6242761/determine-direct-shared-object-dependencies-of-a-linux-binary readelf -d binaryname

Linux disk space analyzer

Baobab: http://www.marzocca.net/linux/baobab/

Sample neovim config

Sample neovim config imap jk <Esc> set autoindent set expandtab set shiftwidth=2 set tabstop=2 nnoremap :Files ~ let g:fzf_action = { \ 'ctrl-t': 'tab split', \ 'ctrl-i': 'split', \ 'ctrl-v': 'vsplit' } call plug#begin() Plug 'junegunn/fzf', { 'do' : { -> fzf#install() } } Plug 'junegunn/fzf.vim' call plug#end() Config file is located in   ~/AppData/Local/nvim in Windows and ~/.config/nvim in Linux. init.vim is the name of the config file.