Skip to content

Instantly share code, notes, and snippets.

View SebastienGautier's full-sized avatar

Sébastien Gautier SebastienGautier

View GitHub Profile
@SebastienGautier
SebastienGautier / index.php
Created July 18, 2018 16:06
Get daily computer usage based on explorer.exe running time with Elasticsearch and Metricbeats
<?php
$client = ClientBuilder::create()->setHosts(['127.0.0.1'])->build();
$params = [
'index' => 'metricbeat-*',
'body' => [
'query' => [
'bool' => [
'must' => [

Keybase proof

I hereby claim:

  • I am groseb on github.
  • I am groseb (https://keybase.io/groseb) on keybase.
  • I have a public key ASDe-fU4GVs5uKwejGKmD4YKgWB3SRNuK0Ah7UgDLBJpHAo

To claim this, I am signing this object:

@SebastienGautier
SebastienGautier / gist:c8681ed31aa517dfff94
Created March 27, 2015 09:23
Save a jquery-ui dialog's size and position in cookies (requires jquery.cookie)
//https://jqueryui.com/dialog/
//https://github.com/carhartl/jquery-cookie
$("#dialog").dialog({
width: ($.cookie('dialog-width') || 500),
height: ($.cookie('dialog-height') || 300),
position: {
my: $.cookie('dialog-pos-my') || 'center',
at: $.cookie('dialog-pos-at') || 'center',
of: window