Skip to content

Instantly share code, notes, and snippets.

View AlessandroIudicone's full-sized avatar

Alessandro Iudicone AlessandroIudicone

View GitHub Profile
@rkuzsma
rkuzsma / WaitFor.java
Created December 30, 2016 03:54
Java utility class to wait for ports and URL responses to be available
/**
* General utilities to wait for ports and URL responses to be available.
* Especially useful when waiting for container services to be fully "up".
*/
public class WaitFor {
private static final Logger logger = LoggerFactory.getLogger(WaitFor.class.getClass());
public static void waitForPort(String hostname, int port, long timeoutMs) {
logger.info("Waiting for port " + port);
@NickVanderPyle
NickVanderPyle / MachineEncryption.psm1
Created October 20, 2016 17:39
Powershell module to do machine-specific encryption.
Add-Type -AssemblyName "System.Security"
function ConvertTo-EncryptedString{
[cmdletbinding()]
[OutputType([string])]
param(
[parameter(Mandatory=$true, ValueFromPipeline=$true)]
[ValidateNotNull()]
[string]$stringToEncrypt)
Process{