Skip to content

Instantly share code, notes, and snippets.

@jirrick
jirrick / parse.sh
Last active August 14, 2017 16:19 — forked from cb372/query.json
Using the Elasticsearch scroll API
#!/bin/bash
es_url=192.168.1.2:9200
index=twitch_v2
response=$(curl -s $es_url/$index/_search?scroll=1m -d @query.json)
scroll_id=$(echo $response | jq -r ._scroll_id)
hits_count=$(echo $response | jq -r '.hits.hits | length')
hits_so_far=hits_count
echo Got initial response with $hits_count hits and scroll ID $scroll_id
import java.util.*;
public class FizzBuzz
{
Map<Integer, String> map;
public FizzBuzz()
{
Init();
}
@jirrick
jirrick / gist:1973410
Created March 4, 2012 15:02 — forked from anonymous/gist:1973406
Amy's 'route print'
===========================================================================
Interface List
13...00 50 56 aa 62 c1 ......vmxnet3 Ethernet Adapter
1...........................Software Loopback Interface 1
12...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
19...00 00 00 00 00 00 00 e0 Microsoft Teredo Tunneling Adapter
===========================================================================
IPv4 Route Table
===========================================================================
@jirrick
jirrick / Rko.txt
Created March 2, 2012 01:34 — forked from anonymous/Rko.txt
Rko - "tutorial"
#######################
########################
## Pravdepodobnost a statistika NMAI059
## Pouziti programu R
## http://artax.karlin.mff.cuni.cz/~novap4dm/Uvod.r
# spustime pres Rgui
# programy obvykle piseme a ukladame jako scripty .r
# radky programu ze scriptu spoustime pomoci ctrl+r