Invalid signature from repo.skype.com

July 24, 2021 Leave a comment

Problem:
I was getting the following error when I ran `sudo apt-get update`

Reading package lists… Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://repo.skype.com/deb stable InRelease: The following signatures were invalid: EXPKEYSIG 1F3045A5DF7587C3 Skype Linux Client Repository
W: Failed to fetch https://repo.skype.com/deb/dists/stable/InRelease The following signatures were invalid: EXPKEYSIG 1F3045A5DF7587C3 Skype Linux Client Repository
W: Some index files failed to download. They have been ignored, or old ones used instead.

Solution:

# Delete the old key
$ sudo apt-key del 1F3045A5DF7587C3
# Add the new one
$ curl https://repo.skype.com/data/SKYPE-GPG-KEY | sudo apt-key add -

Source:
https://askubuntu.com/questions/1348146/invalid-signature-from-repo-skype-com-how-can-i-clear-this

Categories: debian

Recover deleted git branch from local

July 23, 2021 Leave a comment

Problem:
I deleted a branch locally that had a commit that I needed.

Solution:
Find the SHA for the commit at the tip of your deleted branch using:

$ git reflog

To restore the branch, use:

$ git checkout -b <branch> <sha>

Source:
https://imran-ahmad.medium.com/how-to-recover-restore-deleted-git-branch-5a068c07bed2

Categories: git

Developers Guide to GPG and YubiKey

July 22, 2021 Leave a comment

https://developer.okta.com/blog/2021/07/07/developers-guide-to-gpg

Setting up a new YubiKey as a second factor is easy—your browser walks you through the entire process. However, setting up a YubiKey to sign your Git commits and Secure Shell (SSH) authentication is a very different experience. In this post, I’ll walk through configuring a YubiKey and highlight some of the things I’ve learned along the way.

Categories: Interesting Tags: ,

Big O Notation Series #6: Big O of N Factorial

July 21, 2021 Leave a comment

Big O of N Factorial: In this video you will learn how to visualize and understand big o of n factorial or O(n!).

Categories: Interesting Tags:

Filling out a pdf document using Libreoffice draw

June 4, 2021 Leave a comment

Problem:
I was looking for software that would allow me to fill out a pdf document. A quick search on google indicated that I could use Libreoffice on linux. The issue was that every time I tried to open the pdf file, it would open it up in Libreoffice-writer and display gibberish.

Solution:
Turns out that I needed to install some software.

$ sudo apt-get install libreoffice-pdfimport

And now when I tried to open the pdf file again, it opens up in Libreoffice-draw and I was able to fill it out.

Categories: Interesting Tags: ,

A visual guide on troubleshooting Kubernetes deployments

March 4, 2021 Leave a comment
Categories: Interesting Tags:

A visual guide to SSH tunnels

February 11, 2021 Leave a comment

SSH tunnels are encrypted TCP connections between SSH clients and servers that allows traffic entering one side of the tunnel to transparently exit through the other. While the term originally referred to tunnels using TUN/TAP virtual network interfaces, it’s commonly used to refer to SSH port forwarding nowadays. Use cases include:

– Providing encrypted channels for protocols that use plaintext
– Opening backdoors into private networks
– Bypassing firewalls

https://robotmoon.com/ssh-tunnels/

Categories: Interesting Tags: ,

How Python Decorators Work: 7 Things You Must Know

February 9, 2021 Leave a comment

Decorators are something you will encounter in your development journey. Let’s find out how Python decorators work and how you can use them.

What is a Python decorator?

A Python decorator is a feature (or design pattern) that allows to enhance the logic of functions, methods or classes without changing the original code. To represent a decorator in Python you can use the @ symbol followed by the name of the decorator.

In this tutorial we will go through 7 things you must know about Python decorators.

https://codefather.tech/blog/how-python-decorators-work/

Categories: Interesting Tags:

Linting & Fixing React with Vim, ALE, XO, and Prettier

February 8, 2021 Leave a comment

Linting.
Ah… yes… that thing you need to add to a project, that you just don’t want to add. But, there is this little voice in your head telling you to do this because… Just because.
It’s like testing. I’ve always slacked to add either tests or linting because they felt like a lot of useless work.

Things changed when, a while ago I was coding in python. There are plugins like black and iSort that do lots of useful code cleaning routines. For example, isort sorts imports in a smart way. Black formats the code for me so that I no longer worry if this python line has wrong indentation.

https://www.codementor.io/@piotryordanov/linting-fixing-react-with-vim-ale-xo-and-prettier-whucsrrb3

Categories: Interesting Tags: , , , , ,

Ubuntu Snap Packages: Complete guide to snap package management tool

February 4, 2021 Leave a comment

Traditionally, we have different Linux distributions using different package format and it has been a problem for both developers and users. Debian based distributions use deb packages, redhat based distributions use rpm packages while there are many other Linux variants using their own package format.

Snappy is a universal package format introduced by canonical, the same company behind the Ubuntu operating system. The goal of the snap is to provide a universal package format that works across all Linux distributions.

In this tutorial we will learn how to use snap package manager in Ubuntu to install, configure, update and remove software and applications.

https://www.configserverfirewall.com/ubuntu-linux/ubuntu-snap-packages/

Categories: Interesting Tags: ,