Skip to content

Instantly share code, notes, and snippets.

View jdevalk's full-sized avatar
😀

Joost de Valk jdevalk

😀
View GitHub Profile
@jclosure
jclosure / contains_key_or_empty.txt
Created July 3, 2017 05:33
Kibana Painless scripted field checks if field exists or is empty and returns default, otherwise value
if (!doc.containsKey('myfield') || doc['myfield'].empty) { return "unavailable" } else { return doc['myfield'].value }
@jdevalk
jdevalk / wordstream-api-class.php
Created October 23, 2011 19:39
WordStream API interface class for WordPress
<?php
/**
* Class containing all the functionality to get data from the WordStream API
*
* @link http://api.wordstream.com/doc/introduction
*
* @author Joost de Valk <[email protected]>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*