Skip to content

Instantly share code, notes, and snippets.

View carlosjgp's full-sized avatar
🎯
Focusing

Carlos Juan Gómez Peñalver carlosjgp

🎯
Focusing
View GitHub Profile
@carlosjgp
carlosjgp / MyRestControllerV1.java
Last active July 24, 2016 11:53
[Spring Boot] Nuevo endpoint REST
package com.example;
public class MyRestController {
public String hello(){
return "Hello";
}
}
@carlosjgp
carlosjgp / application.properties
Last active July 24, 2016 12:15
[Spring Boot] Provide MySql database
spring.datasource.url=jdbc:mysql://localhost:3306/aarlensdb?useSSL=false&characterEncoding=utf8
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.username=my-username
spring.datasource.password=password
spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
spring.jpa.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
@carlosjgp
carlosjgp / JAR
Created July 24, 2016 12:01
[Spring Boot] How to run Spring Boot app
mvn clean package && java -jar target/nombreArtefacto-VERSION.jar
@carlosjgp
carlosjgp / Dockerfile
Last active July 24, 2016 16:02
[Spring Boot] Docker compose
FROM anapsix/alpine-java
EXPOSE 8080
ADD target.jar app.jar
RUN sh -c 'touch /app.jar'
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
@carlosjgp
carlosjgp / docker-compose.yml
Last active July 24, 2016 15:25
[Spring Boot] Docker compose
version: '2.0'
services:
awesome-service-1:
image: com.example/demo
ports:
- 8080:8080
awesome-service-2:
image: com.example/demo
ports:
- 8080:8081
@carlosjgp
carlosjgp / drools.sh
Created July 24, 2016 16:55
[Docker] Examples
docker run -P -d --name drools-workbench jboss/drools-workbench-showcase:6.2.0.Final
@carlosjgp
carlosjgp / output
Created September 1, 2016 09:18
Jackson message too verbose
{
"status": 400,
"message": "Invalid json body - Unexpected end-of-input: expected close marker for Object (start marker at [Source: java.io.PushbackInputStream@1509e1b; line: 1, column: 1]).",
"type": "JSON_VALIDATION",
"errors": null
}
{
"Timestamp": "2017-06-28T16:16:27+01:00",
"Go Server Information": {
"Version": "17.2.0 (4587-442a7d67087844e44a2dcf5824164e1dfe00cc45)"
},
"Config Statistics": {
"Valid Config": {
"Number of pipelines": 212,
"Number of agents": 26,
"Number of environments": 9,
ERROR in ./src/styles/app.scss
Module build failed: Error: "/icons/icons.json" is not in the SourceMap.
at BasicSourceMapConsumer.SourceMapConsumer_sourceContentFor [as sourceContentFor] (/src/node_modules/source-map/lib/source-map-consumer.js:704:13)
at SourceMapGenerator.<anonymous> (/src/node_modules/source-map/lib/source-map-generator.js:235:40)
at Array.forEach (native)
at SourceMapGenerator_applySourceMap [as applySourceMap] (/src/node_modules/source-map/lib/source-map-generator.js:234:32)
at MapGenerator.applyPrevMaps (/src/node_modules/postcss/lib/map-generator.js:144:22)
at MapGenerator.generateMap (/src/node_modules/postcss/lib/map-generator.js:205:46)
at MapGenerator.generate (/src/node_modules/postcss/lib/map-generator.js:308:25)
at LazyResult.stringify (/src/node_modules/postcss/lib/lazy-result.js:290:24)
@carlosjgp
carlosjgp / brew_cask_install.sh
Last active December 23, 2017 11:46
OSX installation
#Oh my zsh https://gist.github.com/kevin-smets/8568070
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# ZSH_THEME="powerlevel9k/powerlevel9k"
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
brew cask install google-chrome keka calibre minikube iterm2 gitter vlc tomighty mattermost slack tunnelblick sequel-pro skype
java stremio lastpass
brew install zsh-syntax-highlighting