Elasticsearch is index based storage. Many things need to be considered when creating indices such as properties, data types, number of shards, number of replicas, refresh interval. Elasticsearch doesn't have schemas. All these things can be set when creating the index or use a template to handle it. After template defined, all the indices that match "index_patterns" will apply all the properties in the template. By using templates, it becomes easier to change index settings, mappings and aliases.
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
This file contains hidden or 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
| package main | |
| import ( | |
| "crypto/tls" | |
| "crypto/x509" | |
| "fmt" | |
| "io/ioutil" | |
| "net/http" | |
| ) |
This file contains hidden or 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
| origin | dest | count | time | ||
|---|---|---|---|---|---|
| 1 | 2 | 27.7 | |||
| 1 | 3 | 34.7 | |||
| 1 | 4 | 21.2 | https://flowmap.blue/od-matrix-converter | ||
| 1 | 5 | 1.4 | |||
| 1 | 6 | 18.9 | |||
| 1 | 9 | 37.1 | |||
| 1 | 8 | 46.1 | |||
| 2 | 1 | 25.7 | |||
| 2 | 3 | 10.6 |
This file contains hidden or 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
| { | |
| "annotations": { | |
| "list": [ | |
| { | |
| "builtIn": 1, | |
| "datasource": "-- Grafana --", | |
| "enable": true, | |
| "hide": true, | |
| "iconColor": "rgba(0, 211, 255, 1)", | |
| "name": "Annotations & Alerts", |
This file contains hidden or 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
| import java.security.cert.CertificateException; | |
| import java.security.cert.X509Certificate; | |
| import javax.net.ssl.HostnameVerifier; | |
| import javax.net.ssl.SSLContext; | |
| import org.apache.http.HttpEntity; | |
| import org.apache.http.HttpResponse; | |
| import org.apache.http.client.HttpClient; | |
| import org.apache.http.client.methods.HttpGet; |
This file contains hidden or 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
| using System; | |
| using System.Threading; | |
| static class Program { | |
| static void Main() { | |
| Console.Write("Performing some task... "); | |
| using (var progress = new ProgressBar()) { | |
| for (int i = 0; i <= 100; i++) { | |
| progress.Report((double) i / 100); |
This file contains hidden or 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
| using System; | |
| using System.Diagnostics; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| public static class ProcessAsyncHelper | |
| { | |
| public static async Task<ProcessResult> ExecuteShellCommand(string command, string arguments, int timeout) | |
| { | |
| var result = new ProcessResult(); |
This file contains hidden or 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
| using System; | |
| using System.Runtime.InteropServices; | |
| using System.Text; | |
| namespace GoSharedDLL | |
| { | |
| class Program | |
| { | |
| [DllImport("shared.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)] | |
| private static extern IntPtr ReturnReversedString(byte[] input); |
NewerOlder