Skip to content

Instantly share code, notes, and snippets.

@Hounddog
Hounddog / Data
Last active August 29, 2015 14:24
{
"_index":"cards",
"_type":"card",
"_id":"1",
"_score":1.0,
"_source":{
"id":2,
"givenName":"Bob",
"familyName":"Singor",
"honorificSuffixes":null,
@Hounddog
Hounddog / config
Created April 28, 2015 10:59
nginx filter passzord
# Custom logstash format
log_format logstash '$http_host '
'$remote_addr [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" "$temp_request_body" '
'$request_time '
'$upstream_response_time';
@Hounddog
Hounddog / elasticsearch-connection
Created April 21, 2015 18:34
logstash debugging
ubuntu@ip-10-0-0-23:~$ curl -XGET '10.0.0.215:9200'
{
"status" : 200,
"name" : "Joey Bailey",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "1.4.4",
"build_hash" : "c88f77ffc81301dfa9dfd81ca2232f09588bd512",
"build_timestamp" : "2015-02-19T13:05:36Z",
"build_snapshot" : false,
@Hounddog
Hounddog / ls
Last active August 29, 2015 14:19
Logstash
ubuntu@ip-10-0-0-162:/etc/logstash$ ls -al
total 18856
drwxrwxr-x 3 root root 4096 Apr 17 20:03 .
drwxr-xr-x 115 root root 4096 Apr 17 14:00 ..
-rwxrwxrwx 1 root root 19296245 Apr 17 20:03 GeoLiteCity.dat
drwxrwxr-x 2 root root 4096 Apr 17 20:32 conf.d
@Hounddog
Hounddog / Vagrant Proxy
Created April 14, 2015 18:25
Vagrant Proxy
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'yaml'
# Read YAML file with box details
servers = YAML.load_file('servers.yml')
#ARGV
skip = 0
@Hounddog
Hounddog / Vagrant
Last active June 12, 2016 15:08
Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'yaml'
require 'ipaddr'
settings = YAML.load_file 'vagrant.yml'
aws_settings = settings["aws"]
vm_settings = settings["vm"]
# Read YAML file with box details
@Hounddog
Hounddog / api-staging.yml
Created April 8, 2015 15:16
Group configuration
elasticsearcg: localhost
rabbit-mq: localhost
every server under staging has this setting
vagrant@vagrant-ubuntu-saucy-64:/etc/nginx/conf.d$ varnishlog
0 CLI - Rd ping
0 CLI - Wr 200 19 PONG 1409742858 1.0
0 CLI - Rd ping
0 CLI - Wr 200 19 PONG 1409742861 1.0
0 Debug - "VCL_error(750, https://dev.api.clingr.de/site/mshwalbe/test)"
11 SessionOpen c 192.168.56.1 57864 :80
11 ReqStart c 192.168.56.1 57864 912613504
11 RxRequest c GET
11 RxURL c /site/mshwalbe/test
@Hounddog
Hounddog / release.sh
Created July 10, 2014 14:49
Release Directory
#!/bin/sh
#copy this script to the installation folder of the v5
#
# Create new Release
# ./update.sh release /path/to/release;
#
# Update existing Clients
# ./update.sh update /path/to/release /path/to/build.properties;
#
# Setup new Release Structure
@Hounddog
Hounddog / AbstractSearch.php
Last active August 29, 2015 14:03
Search Service
<?php
namespace API\Service
use HD\Api\Client\Client;
abstract class AbstractSearch
{
protected $client;