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
| /* Put behind .flexbox for Feature detection with Modernizr */ | |
| .flex-card-list { | |
| display:flex; | |
| flex-wrap:wrap; | |
| } | |
| .flex-card-listitem { | |
| display:flex; | |
| } |
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
| @RunWith(SpringJUnit4ClassRunner.class) | |
| @SpringApplicationConfiguration(classes = Application.class) | |
| @ActiveProfiles("test") // activate test configuration | |
| public class AccountRepositoryTest { | |
| private @Autowired AccountRepository accountRepo; | |
| private @Autowired ApplicationContext applicationContext; // !!important to have it here | |
| public @Rule MongoDbRule mongoDbRule = MongoDbRuleBuilder.newMongoDbRule().defaultSpringMongoDb( | |
| "spring-dbname"); // name should match spring mongodb 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
| // get status code | |
| HttpClient client = HttpClientBuilder.create().build(); | |
| HttpResponse response = client.execute(new HttpGet(SAMPLE_URL)); | |
| int statusCode = response.getStatusLine().getStatusCode(); | |
| assertThat(statusCode, equalTo(HttpStatus.SC_OK)); | |
| // set timeout | |
| // !!the Connection Timeout (http.connection.timeout) – the time to establish the connection with the remote host | |
| // !!the Socket Timeout (http.socket.timeout) – the time waiting for data – after the connection was established; maximum time of inactivity between two data packets | |
| // the Connection Manager Timeout (http.connection- manager.timeout) – the time to wait for a connection from the connection manager/pool |
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 MAX(entitlement_source_id)+1 FROM entitlement_source | |
| ALTER TABLE entitlement_source ALTER COLUMN entitlement_source_id RESTART WITH 83; |
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
| public class OAuthClientTest { | |
| @Test | |
| public void test() { | |
| ResourceOwnerPasswordResourceDetails resource = new ResourceOwnerPasswordResourceDetails(); | |
| resource.setClientAuthenticationScheme(AuthenticationScheme.header); | |
| resource.setId("restservice"); | |
| resource.setClientId("clientapp"); | |
| resource.setClientSecret("123456"); | |
| resource.setAccessTokenUri("http://localhost:8080/oauth/token"); |
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
| <!-- template.html --> | |
| <html> | |
| <head> | |
| <title>Hello React</title> | |
| <script src="http://fb.me/react-0.12.1.js"></script> | |
| <script src="http://fb.me/JSXTransformer-0.12.1.js"></script> | |
| <script src="http://code.jquery.com/jquery-1.10.0.min.js"></script> | |
| <script src="http://cdnjs.cloudflare.com/ajax/libs/showdown/0.3.1/showdown.min.js"></script> | |
| </head> | |
| <body> |
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
| @Configuration | |
| @ComponentScan | |
| @EnableAutoConfiguration | |
| public class Application implements CommandLineRunner { | |
| public static void main(String[] args) { | |
| SpringApplication.run(Application.class, args); | |
| } | |
| @Bean(name = "state") |