This file contains hidden or 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 org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.context.annotation.Configuration; | |
| import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; | |
| import org.springframework.security.config.annotation.web.builders.HttpSecurity; | |
| import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; | |
| import org.springframework.security.config.annotation.web.servlet.configuration.EnableWebMvcSecurity; | |
| @Configuration | |
| @EnableWebMvcSecurity | |
| public class SecurityConfig extends WebSecurityConfigurerAdapter{ |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> | |
| <head> | |
| <title>Login page</title> | |
| </head> | |
| <body> | |
| <h1>Login page</h1> | |
| <p th:if="${loginError}">Wrong user or password</p> | |
| <form th:action="@{/login}" method="post"> | |
| <label for="username">Username</label>: |
This file contains hidden or 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 org.springframework.core.convert.converter.Converter; | |
| import java.time.LocalDateTime; | |
| public class LocalDateTimeToStringConverter implements Converter<LocalDateTime, String> { | |
| @Override | |
| public String convert(LocalDateTime localDateTime) { | |
| return localDateTime.toString(); | |
| } |
This file contains hidden or 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
| wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-x64.tar.gz | |
| tar -zxf jdk-8u25-linux-x64.tar.gz | |
| export PATH=$OPENSHIFT_DATA_DIR/jdk1.8.0_25/bin:$PATH | |
| export JAVA_HOME="$OPENSHIFT_DATA_DIR/jdk/jdk1.8.0_25" |
This file contains hidden or 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
| * http://scalakata.com/index | |
| * https://github.com/lauris/awesome-scala | |
| * https://github.com/scalatron/scalatron/blob/master/Scalatron/doc/markdown/Scalatron%20Tutorial.md | |
| //Video | |
| * https://skillsmatter.com/conferences/1948-scala-exchange-2014#skillscasts | |
| * "Code Reviews Gems" - https://skillsmatter.com/skillscasts/5848-code-reviews-gems | |
| * "Cake Pattern: The Bakery from the Black Lagoon" [https://www.youtube.com/watch?v=yLbdw06tKPQ] | |
| //Blog |
This file contains hidden or 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
| +Navigation | |
| * https://medium.com/@andrey_cheptsov/top-20-navigation-features-in-intellij-idea-ed8c17075880 |
This file contains hidden or 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 table_name, table_rows | |
| FROM INFORMATION_SCHEMA.TABLES | |
| WHERE TABLE_SCHEMA = 'schem_name'; |
This file contains hidden or 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 scala.language.dynamics | |
| class MyDynamicClass extends Dynamic { | |
| private val fields = scala.collection.mutable.Map("foo" -> "1", "bar" -> 2) | |
| def selectDynamic(fieldName: String) = fields.get(fieldName) | |
| def addField(field: (String, String)) = fields += field | |
| } | |
| val dynamic = new MyDynamicClass() | |
| dynamic.foo | |
| dynamic.addField("wtf" -> "THIS IS SCALA!") |
This file contains hidden or 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
OlderNewer