I hereby claim:
- I am fforbeck on github.
- I am fforbeck (https://keybase.io/fforbeck) on keybase.
- I have a public key ASCsk2AV2WsPAhosHTW23A9I0NuwzfIHdSzpSnKYRaCUUgo
To claim this, I am signing this object:
DECLARE E INT DEFAULT 0; | |
DECLARE M TEXT DEFAULT NULL; | |
DECLARE CONTINUE HANDLER FOR 1000 SET E='1000', M="hashchk"; | |
DECLARE CONTINUE HANDLER FOR 1001 SET E='1001', M="isamchk"; | |
DECLARE CONTINUE HANDLER FOR 1002 SET E='1002', M="NO"; | |
DECLARE CONTINUE HANDLER FOR 1003 SET E='1003', M="YES"; | |
DECLARE CONTINUE HANDLER FOR 1004 SET E='1004', M="Can't create file '%s' (errno: %d)"; | |
DECLARE CONTINUE HANDLER FOR 1005 SET E='1005', M="Can't create table '%s' (errno: %d)"; | |
DECLARE CONTINUE HANDLER FOR 1006 SET E='1006', M="Can't create database '%s' (errno: %d)"; |
const got = require('got'); | |
module.exports = (ctx, cb) => { | |
var weatherForCity = 'http://api.openweathermap.org/data/2.5/weather?&units=metric&APPID=8b49f82415341963f8768cce938de042&q=' + ctx.body.text; | |
got(weatherForCity) | |
.then(response => { | |
var json = JSON.parse(response.body); | |
var weather = json.weather[0].description + ', ' + json.main.temp + ' celcius'; | |
cb(null, { text: weather}); | |
}) |
I hereby claim:
To claim this, I am signing this object:
"settings": { | |
"analysis": { | |
"filter": { | |
"hashtag_filter": { | |
"type": "word_delimiter", | |
"type_table": [ | |
"# => ALPHA", | |
"@ => ALPHA" | |
] | |
} |
sudo rabbitmqctl set_policy -p host --apply-to queues max-msg-size "^queue.name.pattern$" '{"max-length-bytes":100000000}' |
[ req ] | |
distinguished_name="req_distinguished_name" | |
prompt="no" | |
[ req_distinguished_name ] | |
C="<country>" | |
ST="<state>" | |
L="1234" | |
O="1234" | |
CN="{DOMAIN}" |
rabbitmqctl purge_queue "<target.queue>" -p <vhost> |
#!/usr/bin/env bash | |
URL="http://localhost:15672/cli/rabbitmqadmin" | |
VHOST="<>" | |
USER="<>" | |
PWD="<>" | |
QUEUE="<>" | |
FAILED_QUEUE="<>" |
# The command deletes the parameter after all messages are moved origin to target queue | |
rabbitmqctl set_parameter -p <vhost> shovel "<origin.queue.name>" '{"src-uri":"amqp://<user>:<pwd>@/<vhost_name>","src-queue":"<origin.queue.name>","dest-uri":"amqp://<user>:<pwd>@/<vhost_name>","dest-exchange":"<target.queue.name>","prefetch-count":1,"reconnect-delay":5,"add-forward-headers":false,"ack-mode":"on-confirm","delete-after":"queue-length"}' |
## | |
# http://stackoverflow.com/questions/19967472/elasticsearch-unassigned-shards-how-to-fix | |
## | |
NODE="YOUR NODE NAME" | |
IFS=$'\n' | |
for line in $(curl -s 'localhost:9200/_cat/shards' | fgrep UNASSIGNED); do | |
INDEX=$(echo $line | (awk '{print $1}')) | |
SHARD=$(echo $line | (awk '{print $2}')) | |
curl -XPOST 'localhost:9200/_cluster/reroute' -d '{ |