This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HOWTO: Make bootable USB stick from ISO on OSX | |
# determine /dev/diskN name of USB stick (e.g. /dev/disk2) | |
diskutil list | |
# convert image.iso to image.dmg (hdiutil adds .dmg automatically) | |
hdiutil convert -format UDRW -o image image.iso | |
# unmount (don't eject!) usb stick | |
diskutil unmountDisk /dev/disk2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global core.editor "open -nW -a 'Brackets'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT username, account_status FROM dba_users WHERE username='SYSTEM'; | |
SELECT 'ALTER USER '|| name ||' IDENTIFIED BY VALUES '''|| spare4 ||';'|| password ||''';' FROM sys.user$ WHERE name='SYSTEM'; | |
ALTER USER SYSTEM IDENTIFIED BY VALUES 'S:8E533D4812DFD460BB9CDB06CEE19681770E9D612CB02B4979D9B4389DAF;2D594E86F93B17A1'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
import java.util.List; | |
import java.util.stream.Stream; | |
public class DynamicTree<T> { | |
private T value; | |
private List<DynamicTree<T>> dynamicTrees; | |
public DynamicTree(T value, List<DynamicTree<T>> dynamicTrees) { | |
this.value = value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-assembly-plugin</artifactId> | |
<version>2.2.1</version> | |
<configuration> | |
<archive> | |
<manifest> | |
<mainClass>path.to.your.main.Class</mainClass> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Export: | |
docker commit <CONTAINER ID> <IMAGE-NAME> | |
e.g. (Oracle XE image) | |
docker commit d1db2b oracle-xe | |
docker save IMAGE-NAME > <IMAGE-NAME>.tar | |
e.g. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>org.jboss.shrinkwrap.resolver</groupId> | |
<artifactId>shrinkwrap-resolver-depchain</artifactId> | |
<version>2.1.0</version> | |
<scope>test</scope> | |
<type>pom</type> | |
</dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.persistence.EntityNotFoundException; | |
import javax.ws.rs.core.Response; | |
import javax.ws.rs.ext.ExceptionMapper; | |
import javax.ws.rs.ext.Provider; | |
@Provider | |
public class EntityNotFoundEjbExceptionMapper implements ExceptionMapper<EntityNotFoundException> { | |
@Override | |
public Response toResponse(EntityNotFoundException exception) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET serveroutput ON; | |
BEGIN | |
FOR c IN( SELECT table_name FROM user_tables WHERE table_name NOT LIKE 'SYS%') | |
LOOP | |
EXECUTE IMMEDIATE ('DROP TABLE ' || c.table_name || ' CASCADE CONSTRAINTS'); | |
END LOOP; | |
FOR s IN (SELECT sequence_name FROM user_sequences ) | |
LOOP | |
EXECUTE IMMEDIATE ('DROP SEQUENCE ' || s.sequence_name); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Provider | |
@Path("/preferences") | |
@Api("/preferences") | |
public class PreferenceResource { | |
@Inject | |
private PreferenceController preferenceController; | |
@Context | |
private UriInfo uriInfo; |