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
def loadProperties() { | |
File credentialsFile = new File("${projectDir}", "credentials.properties"); | |
Properties properties = new Properties(); | |
if(credentialsFile.exists()) { | |
properties.load(new FileInputStream(credentialsFile)); | |
properties.each { prop -> | |
project.ext.set(prop.key, prop.value) | |
} | |
} else { |
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
/* | |
*(function(...) {...} )(); --> This is called Immediately-Invoked Function Expression (IIFE) | |
*/ | |
(function(angular) { | |
'use strict'; | |
/* | |
* The PagingDecorator a decorate(...) method which does the following: | |
* |
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
@RequestMapping(value = "/users/{id}", method = RequestMethod.DELETE) | |
public @ResponseBody boolean delete(@PathVariable(value = "id") String id) { | |
Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); | |
String loggedInUser = authentication.getName(); | |
log.info("Delete user: " + id + ", Current logged-in user: " + loggedInUser); | |
return true; | |
} |
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
module.config(function($httpProvider){ | |
//Simulate http delay by adding an http interceptor that does a timeout | |
$httpProvider.interceptors.push(function($q, $timeout) { | |
return { | |
'response': function(response) { | |
var defer = $q.defer(); | |
$timeout(function() { | |
defer.resolve(response); | |
}, 2300); | |
return defer.promise; |
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
.content h1 { | |
background-color: #EBEBEB; | |
martin-top: 1.5em; | |
padding: .5em; | |
} | |
.content h2 { | |
margin-left: .25em; | |
border-bottom: 2px solid; | |
border-bottom-color: #EBEBEB; | |
} |