Skip to content

Instantly share code, notes, and snippets.

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

Miguel Caceres FoxNeo

👨‍💻
Focusing
  • Germany
View GitHub Profile

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

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

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;
@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

@FoxNeo
FoxNeo / Open-ports-linux.md
Last active March 21, 2021 10:59
Open ports

This command shows all your open ports:

sudo ss -tupln

Random MAC address Linux

If you are connected to a public Wifi and you want to change your MAC address to bypass 30 Minutes free sessions or for privacy, you can easily generate a random mac address every time.

Enable random MAC Address

sudo vi /etc/NetworkManager/conf.d/macchange.conf

Inside write the following lines:

#[device]

Linux

CTRL + Shift + i

@FoxNeo
FoxNeo / install-firefox-developer.md
Last active February 22, 2021 10:44
Install Firefox Developer Edition on Linux

Install Firefox Developer Edition on Linux

Download the bin from the official page: https://www.mozilla.org/de/firefox/developer/

sudo cp -rf firefox-86.0b9.tar.bz2 /opt
sudo tar xjf firefox-86.0b9.tar.bz2
sudo chown -R $USER /opt/firefox
nano ~/.bashrc 
 -&gt; export PATH=/opt/firefox/firefox:$PATH
@FoxNeo
FoxNeo / scp_sample.md
Created February 12, 2021 14:06
scp example upload and download