This is a series of tutorials that will walkthrough:
- Obtaining Consent and Generating PDF
- Creating a Heart Rate Task + Heart Rate with Apple Watch
- Displaying the Results as a chart + Send via HTTP
GET / | |
DELETE starwars | |
DELETE semantic-starwars | |
PUT starwars | |
{ | |
"settings": { | |
"analysis": { | |
"analyzer": { |
This is a series of tutorials that will walkthrough:
# Ingest pipeline that records the timestamp the event was processed (`@received`) | |
# by the ingest pipeline and calculates the difference in milliseconds compared to | |
# the event timestamp (`@timestamp`). | |
POST _scripts/calculate_ingest_delay | |
{ | |
"script": { | |
"lang": "painless", | |
"source": "SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\"); ctx.ingest_delay = (sdf.parse(ctx['received']).getTime() - sdf.parse(ctx['@timestamp']).getTime()) / 1000.0" | |
} |
Last updated March 13, 2024
This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.
Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.
For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.
if (!doc.containsKey('myfield') || doc['myfield'].empty) { return "unavailable" } else { return doc['myfield'].value } |
PUT music | |
{ | |
"settings": { | |
"index": { | |
"analysis": { | |
"filter": { | |
"autocompleteFilter": { | |
"max_shingle_size": "5", | |
"min_shingle_size": "2", | |
"type": "shingle" |
# ======================== Elasticsearch Configuration ========================= | |
# | |
# NOTE: Elasticsearch comes with reasonable defaults for most settings. | |
# Before you set out to tweak and tune the configuration, make sure you | |
# understand what are you trying to accomplish and the consequences. | |
# | |
# The primary way of configuring a node is via this file. This template lists | |
# the most important settings you may want to configure for a production cluster. | |
# | |
# Please see the documentation for further information on configuration options: |
<?php | |
/** | |
* Detects animated GIF from given file pointer resource or filename. | |
* | |
* @param resource|string $file File pointer resource or filename | |
* @return bool | |
*/ | |
function is_animated_gif($file) | |
{ | |
$fp = null; |
In this demonstration I will show you how to read data in Angular2 final release before application startup. You can use it to read configuration files like you do in other languages like Java, Python, Ruby, Php.
This is how the demonstration will load data:
a) It will read an env file named 'env.json'. This file indicates what is the current working environment. Options are: 'production' and 'development';
b) It will read a config JSON file based on what is found in env file. If env is "production", the file is 'config.production.json'. If env is "development", the file is 'config.development.json'.
<?php | |
function get_tls_version($sslversion = null) | |
{ | |
$c = curl_init(); | |
curl_setopt($c, CURLOPT_URL, "https://www.howsmyssl.com/a/check"); | |
curl_setopt($c, CURLOPT_RETURNTRANSFER, true); | |
if ($sslversion !== null) { | |
curl_setopt($c, CURLOPT_SSLVERSION, $sslversion); | |
} |