Uniform all your projects with Task

Increase developer productivity and happiness by removing friction. I propose that you use Task as the common uniforming standard (wrapper) to build, test, and run your team’s application regardless of which programming language, architecture, or underlying build tool is used. [Read More]

Self-Signed-Certificate

Self-signed certificates are public key certificates that are not issued by a certificate authority (CA). You’d use these certificates for development and testing. Create the certificate openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -subj '/O=your-domain-name Inc. [Read More]

SSL-and-TLS-Certificates

HTTPS uses an encryption protocol to encrypt communications. The protocol is called Transport Layer Security (TLS), although formerly it was known as Secure Sockets Layer (SSL). This protocol secures communications by using what’s known as an asymmetric public key infrastructure. [Read More]

Gradle

Publish to local Maven repository

plugins {
 id 'java-gradle-plugin'
 id 'maven-publish'
 ...
}
gradlew publishToMavenLocal -Pversion=wip

Add local Maven repository for plugins

in settings.gradle

pluginManagement {
 repositories {
     mavenLocal()
     gradlePluginPortal()
 }
}
Gradle 

Processes

Jobs Jobs are processes which are started by a shell. CTRL+Z suspends the current foreground job. bg executes job in background. jobs lists background jobs. fg brings job to foreground. [Read More]

Git-submodules

Git clone including submodules git clone --recursive [URL to Git repo] Load submodules in already cloned repo git submodule update --init --recursive Pull all changes in the repo including changes in the submodules [Read More]
Git 

Git

Force pull git reset --hard origin/main Force push git push -f Go back 3 commits git reset --hard HEAD~3 Tig - Text-mode interface for git Jonas.github.io/tig/ sudo apt-get install tig Add custom bindings to . [Read More]
Git 

comm

The comm utility reads file1 and file2, which should be sorted lexically, and produces three text columns as output: lines only in file1; lines only in file2; and lines in both files.

[Read More]

rg

ripgrep (rg) recursively searches directories for a regex pattern.

[Read More]

rsync

Synchronizing files between between folders or machines.

[Read More]

sudo

How disable password authentication so you don’t have to type password every time you want to install something How to fix broken sudo - sudo: parse error in /etc/sudoers near line X Use pkexec [Read More]

watch

watch kubectl get pods -o wide
watch -d uptime
watch -n 5 df -h

while

Timeout issue with kubectl port-forward?

Keep the http-connection alive by polling:

while true ; do nc -vz 127.0.0.1 9817 ; sleep 120 ; done

xmlint

Parsing and formatting XML

Format and read a large xml file with all the data on one line

xmllint --format largefile.xml  | less
xmllint --xpath //screenSizeInch largefile.xml

Static-file-server

How to quickly setup a static file server. Node / Npm npm install http-server -g To use it: cd D:\Folder http-server Or, like this: http-server D:\Folder Python python -m SimpleHTTPServer or [Read More]

Docker-compose

docker-compose up
docker-compose down
docker-compose logs -f
docker-compose logs -f [service] (service is not same as container, look in compose file for service names)
Docker 

Docker

Go inside a running container docker exec -it <containerIdOrName> bash (or /bin/bash or /bin/ash) Look inside an image docker run -it --entrypoint /bin/bash <imageid> Stop and remove all docker containers and images Stop all running containers [Read More]
Docker 

dns

nip.io Dead simple wildcard DNS for any IP Address Stop editing your etc/hosts file with custom hostname and IP address mappings. Dead simple wildcard DNS for any IP Address [Read More]

vim

Copy, Cut, Paste yy - Yank (copy) the current line, including the newline character. 3yy - Yank (copy) three lines, starting from the line where the cursor is positioned. [Read More]
vim 

Mac

Fullscreen toggle with Ctrl + Command + F Move between desktops and/or fullscreens Ctrl + -> Ctrl + <- How to force an app to quit on your Mac Option + Command + Esc [Read More]
Mac 

Xubuntu

installing Problem booting ubuntu [ 3.516984] bcma: Unsupported SPROM revision: 11 [ 3.517071] bcma: bus0: No SPROM available add nomodset to boot params (between quiet and splash) Problem installing GRUB2 (grub-efi-amd64-signed failed installation /target/) [Read More]

find

Find all .jpg files in the /home and sub-directories find /home -name *.jpg Find an empty file within the current directory find . -type f -empty Find all . [Read More]
linux  shell 

ssh

SSH Port forwarding -L Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side. [Read More]
ssh