Skip to content

Instantly share code, notes, and snippets.

View JohnathanMarkSmith's full-sized avatar

Johnathan Mark Smith JohnathanMarkSmith

View GitHub Profile
@JohnathanMarkSmith
JohnathanMarkSmith / InstallMySQL.txt
Last active December 16, 2015 15:19
How to install MySQL on Fedora, CentOS, Red Hat and Scientific Linux
If you are using Fedora, CentOS, Red Hat or Scientific Linux I am going to show you the basic install of MySQL using yum.
Install MySQL Client and Server software
To install MySQL Client and Server enter the following commands:
[root@regan ~]# yum groupinstall "MySQL Database server"
[root@regan ~]# yum groupinstall "MySQL Database client"
To install the MySQL system tables and setup MySQL to start on boot you need to enter the following commands:
@JohnathanMarkSmith
JohnathanMarkSmith / CommonController.java
Last active December 16, 2015 07:09
Look up user in Spring
protected String getUser() {
String username;
LOGGER.debug("getAuthentication().getName():"
+ SecurityContextHolder.getContext().getAuthentication()
.getName());
Object obj = SecurityContextHolder.getContext().getAuthentication()
.getPrincipal();