Skip to content

Instantly share code, notes, and snippets.

@AlexxIT
Last active April 13, 2019 10:41
Show Gist options
  • Save AlexxIT/df44d2dbda5a48d318819fbc5d2557dc to your computer and use it in GitHub Desktop.
Save AlexxIT/df44d2dbda5a48d318819fbc5d2557dc to your computer and use it in GitHub Desktop.
docker stats --all --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}"
docker-compose exec nginx sh -c 'nginx -t && nginx -s reload'
docker-compose exec haproxy haproxy -c -f /usr/local/etc/haproxy/haproxy.cfg && docker-compose kill -s HUP haproxy

open ports

sudo netstat -lptu

elasticsearch

GET /_cat/nodes?h=heap*&v - размер памяти

GET _cat/indices?v - список индексов

GET nginx_access/_search - содержимое индекса

delete_by_query

POST nginx_access/_delete_by_query
{
  "query": { 
    "bool": {
      "must_not": {
        "term": {
          "@v": "1"
        }
      }
    }
  }
}

Удалить при наличии поля

POST nginx_access/_delete_by_query
{
  "query": { 
    "bool": {
      "must": {
        "exists": {
          "field": "message"
        }
      }
    }
  }
}
$('video')[0].playbackRate = 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment