Note: This was written using elasticsearch 0.9.
Elasticsearch will automatically create an index (with basic settings and mappings) for you if you post a first document:
$ curl -X POST 'http://localhost:9200/thegame/weapons/1' -d \
'{
"_id": 1,| #!/usr/bin/env bash | |
| # Use this one-liner to produce a JSON literal from the Git log: | |
| git log \ | |
| --pretty=format:'{%n "commit": "%H",%n "author": "%aN <%aE>",%n "date": "%ad",%n "message": "%f"%n},' \ | |
| $@ | \ | |
| perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \ | |
| perl -pe 's/},]/}]/' |
| # /etc/nginx/nginx.conf | |
| log_format main '{' | |
| '"remote_addr": "$remote_addr",' | |
| '"remote_user": "$remote_user",' | |
| '"time_local": "$time_local",' | |
| '"request": "$request",' | |
| '"status": "$status",' | |
| '"body_bytes_sent": "$body_bytes_sent",' | |
| '"http_referer": "$http_referer",' |
| // create an index with an analyzer "myindex" | |
| curl -X PUT localhost:9200/myindex -d ' | |
| { | |
| "settings" : {` | |
| "index":{ | |
| "number_of_replicas":0, | |
| "number_of_shards":1, | |
| "analysis":{ | |
| "analyzer":{ | |
| "first":{ |
Note: This was written using elasticsearch 0.9.
Elasticsearch will automatically create an index (with basic settings and mappings) for you if you post a first document:
$ curl -X POST 'http://localhost:9200/thegame/weapons/1' -d \
'{
"_id": 1,| # 1. | |
| # $ ansible-playbook default-w-var-sub.yml | |
| # | |
| # PLAY [Test default variable using substitution] ******************************** | |
| # |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| package journal | |
| // #cgo pkg-config: --cflags --libs libsystemd-journal | |
| // #include <systemd/sd-journal.h> | |
| import ( | |
| "C" | |
| ) | |
| func New() (j *C.struct_sd_journal) { | |
| j = new(C.struct_sd_journal) |
| {{inventory_hostname}} | |
| ======================== | |
| {% for group in group_names %} | |
| {{ group }} | |
| {% endfor %} | |
| --- |
| --- | |
| - name: Dump all vars | |
| hosts: all | |
| tasks: | |
| - name: Dump all vars | |
| template: src=scripts/dump_vars.j2 dest=/tmp/ansible.all |
| #!/bin/sh | |
| # this hook is in SCM so that it can be shared | |
| # to install it, create a symbolic link in the projects .git/hooks folder | |
| # | |
| # i.e. - from the .git/hooks directory, run | |
| # $ ln -s ../../git-hooks/pre-commit.sh pre-commit | |
| # | |
| # to skip the tests, run with the --no-verify argument | |
| # i.e. - $ 'git commit --no-verify' |