Skip to content

Instantly share code, notes, and snippets.

GET /tenant1/request/_search?parent=
{
"aggs" : {
"normalized_path" : {
"terms" : { "field" : "normalized_path" }
,
"aggs":{
"load_time_outlier" : {
"percentiles" : {
@ynh
ynh / gist:7508021
Last active December 28, 2015 13:29 — forked from senthilnayagam/gist:6474187
Fix reply
package main
import (
"net"
"os"
)
const (
RECV_BUF_LEN = 1024
)
<html>
<head>
<title>{$subject}</title>
</head>
<body>
<p>{$content}</p>
</body>
</html>
@ynh
ynh / bootstrap.php
Created January 18, 2013 11:55
Replace the file cake/bootstrap.php
<?php
/**
* Basic Cake functionality.
*
* Handles loading of core files needed on every request
*
* PHP versions 4 and 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
@ynh
ynh / gist:3941533
Created October 23, 2012 21:01
Google news template
<table>
{{#responseData.results}}
<tr>
<td>
<h4>{{{title}}}</h4>
<img src="{{image.tbUrl}}" style="float:left;padding-right:10px;" />
{{{content}}}
</td>
</tr>
{{/responseData.results}}
@ynh
ynh / gist:3699666
Created September 11, 2012 16:27
Circle Fail
//============================================================================
// Name : CirclesC.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
#include <cstdio>
@ynh
ynh / gist:3622748
Created September 4, 2012 15:59
ACPC10E
//============================================================================
// Name : SPOJ.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
#include <stdio.h>
@ynh
ynh / gist:3622746
Created September 4, 2012 15:59
ACPC10E
//============================================================================
// Name : SPOJ.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
#include <stdio.h>
<Files ~ "\.coffee$">
Order allow,deny
Deny from all
</Files>
@ynh
ynh / gist:3253494
Created August 4, 2012 01:59
Rucksack Problem
import java.util.ArrayList;
public class Rucksack {
private ArrayList<Item> items=new ArrayList<Item>();
/**
* @param args
*/
public static void main(String[] args) {