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,
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,
#!/bin/bash | |
## | |
## Simple logging mechanism for Bash | |
## | |
## Author: Michael Wayne Goodman <[email protected]> | |
## Thanks: Jul for the idea to add a datestring. See: | |
## http://www.goodmami.org/2011/07/simple-logging-in-bash-scripts/#comment-5854 | |
## Thanks: @gffhcks for noting that inf() and debug() should be swapped, | |
## and that critical() used $2 instead of $1 |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using NodaTime.TimeZones; | |
using NUnit.Framework; | |
namespace what_time_is_it | |
{ |
#!/bin/bash | |
EXIT_CODE=0 | |
STATUS_FILE=/tmp/drbd.status | |
STATUS=$(sed -e 's/.* state:\(.*\)$/\1/' $STATUS_FILE) | |
if [ "${STATUS}" != "MASTER" ]; then | |
echo "current status is ${STATUS}. skip" | |
exit |
'use strict'; | |
var AWS = require('aws-sdk'); | |
var S3 = new AWS.S3(); | |
var readline = require('readline'); | |
exports.handler = function (event, context) { | |
//Get S3 file bucket and name | |
//Make sure to loop through event.Records, don't assume there is only 1 in production!!! | |
var bucket = event.Records[0].s3.bucket.name; | |
var key = event.Records[0].s3.object.key; |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
#[macro_use] extern crate rocket; | |
use std::env; | |
use anyhow::Result; | |
use rocket::State; | |
use rocket::http::Status; | |
use sqlx::{Pool, Postgres}; |