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> | |
<head> | |
<<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.js" type="text/javascript"></script> | |
</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
Rewrite history | |
git filter-branch -f --index-filter 'git rm -rf --cached --ignore-unmatch target/* .idea/*' --prune-empty -- --all | |
Cleanup and reclaim space | |
rm -rf .git/refs/original/ | |
git reflog expire --expire=now --all | |
git gc --aggressive --prune=now |
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
Location: | |
/Applications/Postgres.app/Contents/MacOS/bin/psql | |
JDBC Properties: | |
database.driverClassName=org.postgresql.Driver | |
database.url=jdbc\:postgresql\://localhost\:5432/salesquote | |
database.username= | |
database.password= |
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 CommandLineTokenizer { | |
public static void main(String[] args) throws IOException, InterruptedException { | |
String cmdInput = "curl -X POST -H \"Content-Type:application/json\" -H \"Authorization: xxx\" -d '[{\"sampleId\":\"33\",\"activationCode\":\"Lab-act-code-xxx-zzz\"}]' https://developer.ingenuity.com/datastream/api/v1/activations/a9ab2c34-01b5-4473-864d-0d2f008ae090-5"; | |
// tokenize with quote and single quote characters removed | |
List<String> matchTokens = new ArrayList<String>(); | |
Pattern regex = Pattern.compile("[^\\s\"']+|\"([^\"]*)\"|'([^']*)'"); | |
Matcher regexMatcher = regex.matcher(cmdInput); | |
while (regexMatcher.find()) { |
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
String uri = "https://developer.ingenuity.com/datastream/api/v1/activations/a9ab2c34-01b5-4473-864d-0d2f008ae090-5"; | |
String input = "[{\"sampleId\":\"33\",\"activationCode\":\"Lab-act-code-xxx-zzz\"}]"; | |
Client client = Client.create(); | |
ClientResponse response = client.resource(uri) | |
.type(MediaType.APPLICATION_JSON) | |
.header("Authorization", "xxx") | |
.post(ClientResponse.class, input); |
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
<build> | |
<plugins> | |
<plugin> | |
<artifactId>maven-assembly-plugin</artifactId> | |
<configuration> | |
<archive> | |
<manifest> | |
<mainClass>client.Main</mainClass> | |
</manifest> | |
</archive> |
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
User imsUser = new User(); | |
imsUser.setUserId(1); | |
imsUser.setUsername("[email protected]"); | |
String password = "1234"; | |
imsUser.setPassword(password); | |
License license = new License(); | |
GrantedAuthority[] authorities = new GrantedAuthority[]{ | |
new GrantedAuthorityImpl("ROLE_ME") | |
}; |
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
CasProcessingFilterEntryPoint | |
redirect to cas for authentication with service url callback on success. | |
https://service.com/service/j_spring_cas_security_check | |
Cas20ServiceTicketValidator | |
listen for request to /j_spring_cas_security_check | |
1 read parameter ticket=serviceTicket | |
2 post validate ticket to cas along with pgt call back url (/j_spring_cas_security_proxyreceptor) | |
5 read pgtIou from response and load pgt from ProxyGrantingTicketStorage | |
6 saves pgt and ProxyRetriever to principal session wrapped in CasAuthenticationToken |
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
svn checkout --non-recursive http://svn.ingenuity.com:8081/repos/trunk/ing | |
cd ing | |
svn update ims_component |
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 com.jayway.jsonpath.JsonPath; | |
public class Main { | |
public static final String JSON = "{\"links\":[{\"href\":\"http://localhost:8123/datastream/api/v1/activations/07cba26b-3916-43ba-9ac5-b07b7504d23a-126\",\"rel\":\"self\",\"method\":\"GET\"},{\"href\":\"http://localhost:8123/datastream/api/v1/activations/07cba26b-3916-43ba-9ac5-b07b7504d23a-126\",\"rel\":\"update\",\"method\":\"POST\"},{\"href\":\"http://localhost:8123/datastream/api/v1/activations/07cba26b-3916-43ba-9ac5-b07b7504d23a-126/validate\",\"rel\":\"validate\",\"method\":\"GET\"},{\"href\":\"http://localhost:8123/datastream/api/v1/activations/07cba26b-3916-43ba-9ac5-b07b7504d23a-126/execute\",\"rel\":\"execute\",\"method\":\"POST\"}],\"activation\":{\"id\":\"07cba26b-3916-43ba-9ac5-b07b7504d23a-126\",\"userName\":null,\"state\":\"VALIDATED\",\"creationDate\":null,\"lastModified\":{\"year\":2013,\"era\":1,\"dayOfYear\":263,\"dayOfWeek\":5,\"dayOfMonth\":20,\"centuryOfEra\":20,\"yearOfEra\":2013,\"yearOfCentury\":13,\"weekyear\":2013,\"mon |