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
%% Based on code from | |
%% Erlang Programming | |
%% Francecso Cesarini and Simon Thompson | |
%% O'Reilly, 2008 | |
%% http://oreilly.com/catalog/9780596518189/ | |
%% http://www.erlangprogramming.org/ | |
%% (c) Francesco Cesarini and Simon Thompson | |
-module(frequency). | |
-export([start/0,restarter/0,init/0,allocate/0,deallocate/1,stop/0]). |
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
%% Based on code from | |
%% Erlang Programming | |
%% Francecso Cesarini and Simon Thompson | |
%% O'Reilly, 2008 | |
%% http://oreilly.com/catalog/9780596518189/ | |
%% http://www.erlangprogramming.org/ | |
%% (c) Francesco Cesarini and Simon Thompson | |
-module(frequency). | |
-export([start/0,allocate/0,deallocate/1,stop/0]). |
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
Dispatch=[ | |
{'_', [ | |
{[<<"static">>, '...'], cowboy_http_static, | |
[{directory, "./priv"}, | |
{mimetypes, [ | |
{<<".css">>, [<<"text/css">>]}, | |
{<<".js">>, [<<"application/javascript">>]}, | |
{<<".html">>, [<<"text/html">>]} | |
]} | |
]}, |
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
curl ifconfig.me |
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
var user = { | |
validateCredentials: function (username, password) { | |
return ( | |
(!(username += '') || username === '') ? { error: "No Username Given.", field: 'name' } | |
: (!(username += '') || password === '') ? { error: "No Password Given.", field: 'pass' } | |
: (username.length < 3) ? { error: "Username is less than 3 Characters.", field: 'name' } | |
: (password.length < 4) ? { error: "Password is less than 4 Characters.", field: 'pass' } | |
: (!/^([a-z0-9-_]+)$/i.test(username)) ? { error: "Username contains invalid characters.", field: 'name' } | |
: false | |
); |
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
<bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean" /> | |
<bean id="conversion-service" class="org.springframework.format.support.FormattingConversionServiceFactoryBean" /> | |
<bean id="pathMatcher" class="ac.simons.utils.ExtendedAntPathMatcher" /> | |
<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"> | |
<property name="order" value="0" /> | |
<property name="useDefaultSuffixPattern" value="true" /> | |
<property name="pathMatcher" ref="pathMatcher" /> | |
</bean> |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title></title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="http://github.com/pure/pure/raw/master/libs/pure.js"></script> | |
</head> |
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
<!-- allow only LAN IPs to connect to the manager webapp --> | |
<!-- contrary to the current Tomcat 5.5 documation the value for 'allow' is not a regular expression --> | |
<!-- future versions may have to be specified as 192.168.1.* --> | |
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="192.168.1.*"></Valve> |
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
<Connector> | |
port="80" | |
maxHttpHeaderSize="8192" | |
URIEncoding="UTF-8" | |
maxThreads="150" | |
minSpareThreads="25" | |
maxSpareThreads="75" | |
enableLookups="false" | |
redirectPort="8443" | |
acceptCount="100" |
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
<servlet> | |
<servlet-name>default</servlet-name> | |
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class> | |
<init-param> | |
<param-name>debug</param-name> | |
<param-value>0</param-value> | |
</init-param> | |
<init-param> | |
<param-name>listings</param-name> | |
<param-value>false</param-value> <!-- make sure this is false --> |
NewerOlder