Skip to content

Instantly share code, notes, and snippets.

Go to Settings -> Editor -> File and code templates -> Includes tab (on the right). There is a template header for the new files, you can use the username here:
/**
* @author myname
*/
For system username use:
/**
* @author ${USER}
https://benkiew.wordpress.com/2017/06/04/idea-build-your-own-tomcat-integration-for-the-free-intellij-idea-community-edition/
SET SQL_SAFE_UPDATES = 0;
...
SET SQL_SAFE_UPDATES = 1;

Enable the Extra Packages for Enterprise Linux (EPEL).

$ sudo yum-config-manager --enable epel

Download the latest release of Certbot from EFF onto your EC2 instance using the following command.

$ wget https://dl.eff.org/certbot-auto

Make the downloaded file executable.

@alexislucena
alexislucena / fix-errors-tomcat-netbeans-ubuntu.md
Last active March 27, 2023 11:02
Fix access errors to Tomcat in NetBeans and Ubuntu

The CATALINA_BASE cant't be read / The <CATALINA_HOME>/conf/server.xml can't be read

$ sudo chown -R USERNAME /var/lib/tomcat8
$ sudo chown -R USERNAME /usr/share/tomcat8
$ sudo chown -R USERNAME /etc/tomcat8
$ sudo chown -R USERNAME /var/log/tomcat8
@alexislucena
alexislucena / tomcat-basic-install-on-ubuntu.md
Last active March 19, 2019 17:52
Tomcat 8 basic installation on Ubuntu 16.04 with Java installed

Login as root

$ sudo su

Install updates

$ apt-get update && apt-get upgrade

Install Tomcat from the Ubuntu repository

@alexislucena
alexislucena / install-netbeans-on-ubuntu.md
Created February 17, 2017 15:45
Ubuntu: Install NetBeans on Ubuntu 16.04

Check if Java is installed

$ java -version

Install Ubuntu Make from PPA

$ sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
$ sudo apt-get update
$ sudo apt install ubuntu-make
@alexislucena
alexislucena / vagrant-basic-commands
Last active February 27, 2017 10:51
Vagrant basic commands
$ vagrant up
$ vagrant halt
$ vagrant suspend (hibernate)
$ vagrant ssh
$ vagrant status
$ vagrant destroy
@alexislucena
alexislucena / install-scala-sbt-and-java-on-ubuntu.md
Created December 5, 2016 12:35
Ubuntu: Install Scala, SBT and Java on Ubuntu 16.04

Install Scala 2.11.8

$ sudo apt-get remove scala-library scala
$ sudo wget www.scala-lang.org/files/archive/scala-2.11.8.deb
$ sudo dpkg -i scala-2.11.8.deb

Check Scala version

$ scala -version
@alexislucena
alexislucena / install-oracle-java-8-on-ubuntu.md
Created December 5, 2016 12:22
Ubuntu: Install Oracle Java 8 on Ubuntu 16.04 via PPA

Add the PPA

 $ sudo add-apt-repository ppa:webupd8team/java

Update and install the installer script

$ sudo apt update
$ sudo apt install oracle-java8-installer

Set Java environment variables and Oracle JDK8 as default