Skip to content

Instantly share code, notes, and snippets.

@alefhsousa
alefhsousa / cors.java
Created May 10, 2017 16:47
CorsAdapterSpring.java
@Configuration
public class CorsAdapter extends WebMvcConfigurerAdapter {
@Override
public void addCorsMappings(final CorsRegistry registry) {
registry.addMapping("/**");
}
}
@alefhsousa
alefhsousa / persistence.xml
Last active July 8, 2021 22:35
Sample persistence.xml for Hibernate 5.0.1with postgresql 9
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="jpa">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
@alefhsousa
alefhsousa / installing-oh-my-zsh-fedora.md
Created March 14, 2016 02:19 — forked from jshcrowthe/installing-oh-my-zsh-fedora.md
Installing Oh My ZSH oh Fedora (2015 CIT 325 Image)

Installing oh-my-zsh on Fedora (for DB class images)

Oh-my-zsh is an extension of the traditional z shell that is extensible via community created plugins (Plugins found here: oh-my-zsh github repo). It is, in my opinion, a breath of fresh air in comparison to the traditional bash shell.

DO THE FOLLOWING IN ORDER

Installing ZSH (using yum)

The first step for this install is getting zsh we will do this via yum. From your terminal: