Skip to content

Instantly share code, notes, and snippets.

View jeduoliveira's full-sized avatar
🎯
Focusing

Jorge Eduardo jeduoliveira

🎯
Focusing
View GitHub Profile
curl -XPUT "localhost:9200/_template/default_template" -H 'Content-Type: application/json' -d '{ "template" : "*", "settings" : { "number_of_replicas" : 0 } }'
curl -H "Content-Type: application/json" -XPUT localhost:9200/_settings -d '{ "index" : { "number_of_replicas" : 0 } }'
curl -H "Content-Type: application/json" -XPUT localhost:9200/_cluster/settings -d '{ "transient" : { "cluster.routing.allocation.enable" : "all" } }'
curl -XGET localhost:9200/_cat/shards?h=index,shard,prirep,state,unassigned.reason| grep UNASSIGNED
curl -H "Content-Type: application/json" -XPUT localhost:9200/_settings -d '{ "index" : { "number_of_replicas" : 0 } }'
curl -XPOST localhost:9200/_cluster/reroute?retry_failed=true
HostnameLookups Off
TraceEnable off
ServerSignature Off
ServerTokens Prod
FileETag None
Timeout 300
Options +IncludesNOEXEC
AddType text/html .htm .html .shtm .shtml
AddOutputFilterByType INCLUDES text/html
openssl dhparam -dsaparam -out dhparam.pem 4096
curl -XPOST 'localhost:9200/_cluster/reroute' -d '{
"commands": [{
"allocate": {
"index": "XXXXXXXXXXXXXXXXXXXXXXX",
"shard": 1,
"node": "node-1",
"allow_primary": 1
}
}]
}'
yum -y update
yum -y upgrade
yum -y install wget
wget -O- http://repo.issabel.org/issabel4-netinstall.sh | bash
wget -O- https://github.com/ibinetwork/IssabelBR/raw/master/patch-issabelbr.sh | bash
yum install issabel-callcenter
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt-get install -y nodejs
curl -L https://npmjs.org/install.sh | sudo sh
npm install -g @angular/cli@latest
User: pi
Pass: raspberry
### Wifi settings
sudo raspi-config
sudo visudo
USER ALL=(ALL:ALL) ALL
# read more here http://tautt.com/best-nginx-configuration-for-security/
# don't send the nginx version number in error pages and Server header
server_tokens off;
# config to don't allow the browser to render the page inside an frame or iframe
# and avoid clickjacking http://en.wikipedia.org/wiki/Clickjacking
# if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri
# https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options
add_header X-Frame-Options SAMEORIGIN;
cat intranet_log20191113_*.log | sed -E "s/ItemId.*//g" | awk '{ print $5 ; }' | sort | uniq -c | sort -n -r | head -n 10