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
#!/usr/bin/env jjs | |
var lookup = function(host) { | |
var start = java.lang.System.currentTimeMillis(); | |
try { | |
//new java.net.InetSocketAddress(host, 47100); | |
java.net.InetAddress.getAllByName(host); | |
} catch (e) { | |
print(e); | |
} |
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
{ | |
"name": "valtech-shortie", | |
"version": "1.0.0", | |
"dependencies": { | |
"browserify": { | |
"version": "3.46.1", | |
"from": "browserify@^3.31.2", | |
"resolved": "https://registry.npmjs.org/browserify/-/browserify-3.46.1.tgz", | |
"dependencies": { | |
"JSONStream": { |
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
1. Generate a private key | |
`openssl genpkey -algorithm RSA -out signing-private-key.pem -pkeyopt rsa_keygen_bits:2048` | |
2. Extract the public key | |
`openssl rsa -pubout -in signing-private-key.pem -out signing-public-key.pem` | |
3. The key pair can be inspected like this | |
`openssl rsa -text -in signing-private-key.pem -noout` | |
`openssl rsa -in signing-public-key.pem -pubin -text -noout` |
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
if (getServletContext() != null) { | |
ServletContext ctx = getServletContext(); | |
logger.info("Context '{}':", ctx.getContextPath()); | |
Map<String, ? extends ServletRegistration> servletRegistrations = ctx.getServletRegistrations(); | |
for (Map.Entry<String, ? extends ServletRegistration> entry : servletRegistrations.entrySet()) { | |
String servletName = entry.getKey(); | |
ServletRegistration servletRegistration = entry.getValue(); | |
logger.info(" Servlet '{}':", servletName); | |
for (String mapping : servletRegistration.getMappings()) { |
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
Verifying that +jonekdahl is my blockchain ID. https://onename.com/jonekdahl |
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(){function setupAjaxRevoke(container){var form=container.querySelector("form");form&&"post"===form.method&&form.addEventListener("submit",function(e){e.preventDefault();var xhr=new XMLHttpRequest;xhr.onload=function(){204===xhr.status&&(container.style.opacity="0",setTimeout(function(){container.remove()},400))},xhr.open("post",form.action,!0),xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),xhr.send(stringify(form))})}function stringify(form){for(var pairs=[],i=0;i<form.elements.length;i++){var element=form.elements[i];if(element.hasAttribute("name")){var type="input"===element.nodeName.toLowerCase()?element.getAttribute("type").toLowerCase():"text";"file"!==type&&("radio"!==type&&"checkbox"!==type||element.checked)&&pairs.push(escape(element.name)+"="+escape(element.value))}}return pairs.join("&")}for(var containers=document.querySelectorAll("[data-ajax-revoke]"),i=0;i<containers.length;i++)setupAjaxRevoke(containers |