You can post a json file with curl
like so:
curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION
so for example:
#!/bin/bash | |
# start vault | |
VAULT_UI=true vault server -dev -dev-root-token-id=root -dev-listen-address=127.0.0.1:8200 | |
# login as root - DO NOT DO THIS IN PRODUCTION | |
vault login root | |
# write some secrets | |
vault kv put secret/test color=blue number=eleventeen |
#!/bin/sh | |
# Make sure you replace the API and/or APP key below | |
# with the ones for your account | |
# from http://docs.datadoghq.com/api/?lang=console | |
currenttime=$(date +%s) | |
curl -X POST -H "Content-type: application/json" \ | |
-d "{ \"series\" : | |
[{\"metric\":\"test.metric\", | |
\"points\":[[$currenttime, 20]], |
sudo apt update ; sudo apt install -y build-essential net-tools curl git software-properties-common | |
wget https://dl.influxdata.com/telegraf/releases/telegraf_1.19.1-1_amd64.deb | |
sudo dpkg -i telegraf_1.19.1-1_amd64.deb | |
sudo systemctl enable --now telegraf | |
wget https://dl.influxdata.com/influxdb/releases/influxdb_1.8.6_amd64.deb | |
sudo dpkg -i influxdb_1.8.6_amd64.deb | |
sudo systemctl enable --now influxdb | |
influx -execute 'create database telegraf' | |
influx -execute "create user telegraf with password 'ExAmPl3PA55W0rD'" | |
influx -execute 'grant all on telegraf to telegraf' |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
:80 | |
root /usr/src/wordpress | |
gzip | |
fastcgi / wordpress:9000 php | |
rewrite { | |
if {path} not_match ^\/wp-admin | |
to {path} {path}/ /index.php?_url={uri} | |
} | |
log stdout | |
errors stderr |
A quick guide on how to setup Node.js development environment.
Previous versions of these install instructions had been tested with:
A curated list of amazingly awesome Electronic and Hardware platform #WoT #IoT #M2M
FROM docker.elastic.co/elasticsearch/elasticsearch:5.5.1 | |
RUN \ | |
mv /usr/share/elasticsearch/plugins/x-pack /usr/share/elasticsearch/plugins/.removing-x-pack && \ | |
mv /usr/share/elasticsearch/plugins/.removing-x-pack /usr/share/elasticsearch/plugins/x-pack && \ | |
/usr/share/elasticsearch/bin/elasticsearch-plugin remove x-pack |
/* ---------------------------------------- | |
// call finguard() in your app // output will be something like this --> "0821orak0821539ds999.6933.0.76" | |
---------------------------------------- */ | |
function finguard(){function r(r,e){return(e+9845+window.screen.width+r+window.screen.width).split("").reverse().join("")}var e={};(o=(a=navigator.userAgent.toLowerCase()).match(/msie ([\d.]+)/))?e.ie=o[1]:(o=a.match(/firefox\/([\d.]+)/))?e.firefox=o[1]:(o=a.match(/chrome\/([\d.]+)/))?e.chrome=o[1]:(o=a.match(/opera.([\d.]+)/))?e.opera=o[1]:(o=a.match(/version\/([\d.]+).*safari/))&&(e.safari=o[1]);var a,o;e={};return(o=(a=navigator.userAgent.toLowerCase()).match(/msie ([\d.]+)/))?e.ie=o[1]:(o=a.match(/firefox\/([\d.]+)/))?e.firefox=o[1]:(o=a.match(/chrome\/([\d.]+)/))?e.chrome=o[1]:(o=a.match(/opera.([\d.]+)/))?e.opera=o[1]:(o=a.match(/version\/([\d.]+).*safari/))&&(e.safari=o[1]),e.ie?r("itne",e.ie):e.firefox?r("fyfo",e.firefox):e.chrome?r("karo",e.chrome):e.opera?r("orpr",e.opera):e.safari?r("sfri",e.safari):"zefo4 |