Skip to content

Instantly share code, notes, and snippets.

View FoxNeo's full-sized avatar
👨‍💻
Focusing

Miguel Caceres FoxNeo

👨‍💻
Focusing
  • Germany
View GitHub Profile
@FoxNeo
FoxNeo / DBeaver.md
Created March 24, 2021 13:52
a beautiful database tool

DBeaver universal Database Tool

OpenSource 😃 and multiplatform Linux, Mac and Windows

Tomcat TLS with pem cetificates config

  1. edit server.xml
  2. add the cert files to conf/ folder
  3. add the following code to server.xml
<Connector port="443" SSLEnabled="true" secure="true" scheme="https">
  <SSLHostConfig>
    <Certificate certificateFile="conf/cert.pem"
 certificateKeyFile="conf/cert-key.pem" /&gt;

Javadoc comments

class header

/**
* Describe the class here.
*
* {@link some.other.class.Documentation} for linking to other docs or symbols
* {@link some.other.class.Documentation 
* {@code code goes here} for formatting as code

Encrypt files with openSSL

$ openssl aes-256-cbc -a -salt -in photo.jpg -out fimily-photo.enc
enter password: ********

Decrypt file with openSSL

$ openssl aes-256-cbc -d -a -in family-photo.enc -out photo.jpg

gpg commands

List private keys:

$ gpg --list-secret-keys

List public keys:

gpg --list-keys

Change folder to store ssh generated keys:

ssh-keygen -t rsa -b 4096 -C "[email protected]" -f $HOME/keys/id_rsa

tcpdump

To check your local computer network traffic incoming and outcoming traffic with ip targets

$ sudo tcpdump

To save file

$ sudo tcpdump > output.log

Linux show dns

This show your configurated DNS Server con your Linux:

systemd-resolve  --status

Import SSH Key

$ cat ~/id_rsa.pub >> ~/.ssh/authorized_keys