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
<profiles> | |
<profile> | |
<id>start-h2</id> | |
<dependencies> | |
<dependency> | |
<groupId>com.h2database</groupId> | |
<artifactId>h2</artifactId> | |
<version>1.3.162</version> | |
</dependency> | |
</dependencies> |
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
<profile> | |
<id>init-db</id> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>sql-maven-plugin</artifactId> | |
<version>1.5</version> | |
<dependencies> | |
<dependency> |
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
# Copy list of servers in ~/.servers | |
function refresh_server_list | |
{ | |
for ip in $(seq 1 254) ; do nslookup 10.1.2.$ip | grep 'name =' | cut -d ' ' -f 3 | cut -d . -f 1 >> ~/.servers_tmp ; done | |
mv ~/.servers_tmp ~/.servers | |
} | |
(refresh_server_list) | |
if [ -f ~/.servers ] ; then |
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 java.util.Date fromAAAAMMDDStringTojava_util_Date_withJava8(){ | |
Stirng dateStr = "20171031"; | |
TemporalAccessor temporalAccessor = java.time.format.DateTimeFormatter.BASIC_ISO_DATE.parse(dateStr); | |
LocalDate localDate = java.time.LocalDate.from(temporalAccessor); | |
return Date.from(localDate.atStartOfDay(systemDefault()).toInstant()); | |
} |
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/sh | |
# Generate self signed root CA cert | |
openssl req -nodes -x509 -newkey rsa:2048 -keyout ca.key -out ca.crt -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=root/CN=`hostname -f`/[email protected]" | |
# Generate server cert to be signed | |
openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=server/CN=`hostname -f`/[email protected]" | |
# Sign the server cert |
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
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
help: ## print this message | |
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-10s\033[0m\t%s\n", $$1, $$2}' | |
example: ## helm after '##' to automatically print help for a goal | |
echo "example" |
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
$ terraformer --version | |
version v0.7.2 | |
$ terraformer import google list | |
addresses | |
autoscalers | |
backendBuckets | |
backendServices | |
bigQuery | |
cloudFunctions | |
cloudsql |
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 | |
# to run this script just run this with root | |
# curl -sfL https://gist.github.com/Ameausoone/748ed00a3365405dda2c2d7db7493036/raw/install-k8s-single-node-ubuntu.sh | sh - | |
set -eux pipefail | |
# Install Docker CE | |
## Set up the repository: | |
### Install packages to allow apt to use a repository over HTTPS |
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 bash | |
# Check if there is some delete actions in plan, and apply it if not | |
# In Docker image : | |
# FROM hashicorp/terraform:0.12.9 | |
# RUN apk add jq | |
set -eo pipefail |