INSERT GRAPHIC HERE (include hyperlink in image)
Subtitle or Short Description Goes Here
ideally one sentence >
| AWSTemplateFormatVersion: "2010-09-09" | |
| Description: > | |
| Launch a static website backed by an S3 bucket and served via https through cloudfront. | |
| Assumes you have the following available already | |
| * An address in mind (e.g. blog.example.com) | |
| * An existing Route53 Hosted Zone for the domain | |
| * A validated AWS ACM certificate arn for the desired web address which must be in eu-west-1 | |
| Parameters: | |
| HostedZoneID: | |
| Description: > |
| package test.hazelcast | |
| import com.hazelcast.core.IMap | |
| import xitrum.hazelcast.{Hz, Session ⇒ HazelcastSession} | |
| /** Overridden version of xitrum.hazelcast.Session store to limit a user to a | |
| * single session. | |
| */ | |
| class Session extends HazelcastSession { | |
| private[this] lazy val store = Hz.instance.getMap("xitrum/session").asInstanceOf[IMap[String, Map[String, Any]]] |
| import org.mozilla.javascript.Context; | |
| import org.mozilla.javascript.Function; | |
| import org.mozilla.javascript.NativeObject; | |
| import org.mozilla.javascript.Scriptable; | |
| import org.mozilla.javascript.commonjs.module.Require; | |
| import org.mozilla.javascript.commonjs.module.RequireBuilder; | |
| import org.mozilla.javascript.commonjs.module.provider.SoftCachingModuleScriptProvider; | |
| import org.mozilla.javascript.commonjs.module.provider.UrlModuleSourceProvider; | |
| import java.io.File; |
| /* | |
| * author Huber Flores | |
| */ | |
| #Tsung-recorder | |
| #A tool that enables to record activities within a Web browser. Those activies can include filling forms, REST (GET/POST), user sessions, etc. | |
| #Install Tsung as explained in https://gist.github.com/huberflores/2827890 (avoid this step if tsung is already installed) | |
| #Install these dependecies if they are not installed. |
| # http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
| # openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
| import BaseHTTPServer, SimpleHTTPServer | |
| import ssl | |
| httpd = BaseHTTPServer.HTTPServer(('localhost', 4443), SimpleHTTPServer.SimpleHTTPRequestHandler) | |
| httpd.socket = ssl.wrap_socket (httpd.socket, certfile='path/to/localhost.pem', server_side=True) | |
| httpd.serve_forever() |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |