Skip to content

Instantly share code, notes, and snippets.

View jorgesaldivar's full-sized avatar

Jorge Saldivar jorgesaldivar

View GitHub Profile
# List all cron tabs
crontab -l
# Edit crontab
crontab -e
* * * * * /home/user/rolling-bounce.sh
# List all cron tabs
crontab -l
# SSL on localhost for wordpress
https://www.liberiangeek.net/2014/10/install-wordpress-self-signed-ssl-apache2-ubuntu-14-04/
@jorgesaldivar
jorgesaldivar / ubuntu-gnome-vanilla
Last active December 16, 2017 16:50
ubuntu-gnome-vanilla with dash-to-dock extension
1) Install gnome-session
sudo apt-get install gnome-session
2) Clone source https://micheleg.github.io/dash-to-dock/download.html
git clone https://github.com/micheleg/dash-to-dock.git
make
make install
alt + f2 r ENTER
@jorgesaldivar
jorgesaldivar / maven-analysis
Last active December 16, 2017 16:49
maven-analysis on multiple modules at the same time (analyze-report)
# For unix (for mac, add single quotes in the sed command. Ex: sed for sed -i '' 's/...)
for i in */ ; \
do printf "\n\n\n################## - \nanalysis on module $i\n################## - \n\n\n" ; \
cd $i && \
mvn dependency:analyze-report && \
sed -i 's/\.\/images\/logos\/maven-feather.png/http:\/\/maven\.apache\.org\/images\/logos\/maven-feather.png/g' target/dependency-analysis.html && cp target/dependency-analysis.html ~/`pwd | awk -F '/' '{print $NF}'`.html && \
cd ../ ; \
done
Test: Generate archetypes in a new folder location. Ex. ~/maven-folder/ (https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html)
https://dzone.com/articles/spring-boot-secured-by-lets-encrypt
# certbot
git clone https://github.com/certbot/certbot
./certbot-auto certonly -a standalone \
-d jorgesaldivar.com -d www.jorgesaldivar.com
# certbot renew
sudo ./certbot-auto renew
# https://gitlab.com/cryptsetup/cryptsetup
sudo apt-get install -y gnome-disk-utility cryptsetup
Converting Standard certbot artifacts to a JKS
Once you have identified the right cert, you need to recreate the keystore with the new key and cert.
0.- Create a dir to store your keystore, I'm using /etc/tomcat8/keystore/ for this example, you should use the path that you want.
Fetched from -> https://community.letsencrypt.org/t/tutorial-java-keystores-jks-with-lets-encrypt/34754/10
mkdir -p /etc/tomcat8/keystore/
1.- Create a pkcs12 store (change HERETHEPASSWORD with the password you want):
# Mapping same or multiple ports in the same servers to same or different apps
<VirtualHost *:{replace_incoming_port}>
ServerName www.jorgesaldivar.com
ServerAlias jorgesaldivar.com
ProxyPass / http://www.jorgesaldivar.com:{replace_outgoing_port}/
ProxyPassReverse / http://www.jorgesaldivar.com:{replace_outgoing_port}/
RewriteEngine on
RewriteCond %{HTTP_HOST} ^jorgesaldivar.com
# Check if docker is running
service docker.io status
# Exit container
ctrl + p + q
# Docker info and docker version
docker -v
docker version
docker info
@jorgesaldivar
jorgesaldivar / ubuntu.terminal
Last active December 4, 2024 09:49
MAC OS Theme that will make the terminal look like Ubuntu
# MAC OS Theme that will make the terminal look like Ubuntu
# This theme has been created from scratch by fetching all the ANSI colors and fonts from Ubuntu.
# With the exception of the following command fetched from
# http://osxdaily.com/2012/02/21/add-color-to-the-terminal-in-mac-os-x/
# command: "export LSCOLORS=ExFxBxDxCxegedabagacad"
# 1) Copy the following under ~/.bash_profile and restart the terminal.