This file contains 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
#!/bin/bash | |
# File: crawl.sh | |
# Desc: Package designed to provide an API to help automate web testing | |
# Dependencies: curl, getopts | |
# Copyright 2014, Scott Cagno, All rights reserved. | |
# usage function | |
function usage() { | |
echo -e "usage: $0 <opts> -h [host-uri]" | |
echo -e " opts:" |
This file contains 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
#!/bin/bash | |
sudo echo "Need to be root, please authenticate..." | |
echo "Downloading spring source..." | |
curl -o sts.tar.gz http://download.springsource.com/release/STS/3.4.0/dist/e4.3/spring-tool-suite-3.4.0.RELEASE-e4.3.1-linux-gtk-x86_64.tar.gz | |
echo "Extracting..." | |
tar -xf sts*.tar.gz | |
echo "Staging..." | |
sudo mv springsource /opt | |
echo "Creating symbolic links..." | |
sudo ln -s /opt/springsource/sts*/STS /usr/local/bin/sts |
This file contains 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 CodeModelIfForExample { | |
private static final String CLASS_NAME = "TestClass"; | |
public static void main(String args[]) throws Exception{ | |
JCodeModel codeModel = new JCodeModel(); | |
JDefinedClass c = codeModel._class(CLASS_NAME); | |
writeIfElse(codeModel, c); |
This file contains 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
@Controller | |
public class ResourceRestController { | |
@RequestMapping(value="/resource/item", method=RequestMethod.GET) | |
@ResponseBody | |
public String list() { | |
return "list items hit"; | |
} | |
@RequestMapping(value="/resource/item", method=RequestMethod.POST) |
This file contains 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
In SecurityConfig.java (config) | |
====================== | |
... | |
auth.jdbcAuthentication() | |
.dataSource(...) | |
.passwordEncoder(passEncoder()) <--- ADD | |
.usersByUsernameQuery(...) | |
.authoritiesByUsernameQuery(...); | |
... |
This file contains 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
#!/bin/bash | |
# install and stage java8 using apt-get | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get -y install oracle-java8-installer | |
sudo apt-get autoremove | |
sudo apt-get -y install oracle-java8-set-default |
This file contains 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 static Map<String, Object> introspect(Object obj) throws Exception { | |
Map<String, Object> result = new HashMap<String, Object>(); | |
BeanInfo info = Introspector.getBeanInfo(obj.getClass()); | |
for (PropertyDescriptor pd : info.getPropertyDescriptors()) { | |
Method reader = pd.getReadMethod(); | |
if (reader != null) | |
result.put(pd.getName(), reader.invoke(obj)); | |
} | |
return result; | |
} |
This file contains 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
[program:NAME] | |
command=java -Xms128m -Xmx1g -XX:+UseCompressedOops -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -jar /opt/NAME.jar | |
autostart=true | |
autorestart=true | |
stderr_logfile=/var/log/NAME.err.log | |
stdout_logfile=/var/log/NAME.out.log | |
... | |
NOTES: |
This file contains 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)|\(|\)|\;|([a-z]\.[a-z])|\{|\}) |
This file contains 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
a, | |
a:focus, | |
a:hover { | |
color: #fff | |
} | |
.btn-default, | |
.btn-default:focus, | |
.btn-default:hover { | |
color: #333; |
OlderNewer