These are the snippets I use most of the time when administrating my ES cluster
To be updated
curl -XPUT 'http://escluster:9200/_cluster/settings' -d '{
#!/usr/bin/env bash | |
#https://gist.github.com/EyalAr/67791f51fce51ed55594 | |
COLLECTIONS=() | |
HOST="127.0.0.1" | |
PORT="27017" | |
DB= | |
if [ -n "$1" -a "$1" = "--help" ] |
#!/bin/bash | |
HOST="127.0.0.1" | |
PORT="27017" | |
DB_NAME="dev" | |
# get a list of all collections in the database | |
collections=$(mongosh --host $HOST:$PORT --eval "db.getCollectionNames().join('\n')" --quiet $DB_NAME) | |
echo $collection |
<?php namespace Foo; | |
// app/Myapp.php | |
use Monolog\Logger; | |
use Laravel\Lumen\Application; | |
use Monolog\Handler\StreamHandler; | |
use Monolog\Formatter\LineFormatter; | |
use Monolog\Handler\NewRelicHandler; | |
class Myapp extends Application |
$ ssh -V | |
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g 1 Mar 2016 | |
wget https://launchpadlibrarian.net/277739251/openssh-client_7.3p1-1_amd64.deb | |
wget https://launchpadlibrarian.net/298453050/libgssapi-krb5-2_1.14.3+dfsg-2ubuntu1_amd64.deb | |
wget https://launchpadlibrarian.net/298453058/libkrb5-3_1.14.3+dfsg-2ubuntu1_amd64.deb | |
wget https://launchpadlibrarian.net/298453060/libkrb5support0_1.14.3+dfsg-2ubuntu1_amd64.deb | |
sudo dpkg -i libkrb5support0_1.14.3+dfsg-2ubuntu1_amd64.deb | |
sudo dpkg -i libkrb5-3_1.14.3+dfsg-2ubuntu1_amd64.deb | |
sudo dpkg -i libgssapi-krb5-2_1.14.3+dfsg-2ubuntu1_amd64.deb |
# Add PHP 7.3 PPA
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
# Install PHP 7.3 with basic modules
sudo apt-get install php7.3 php7.3-cli php7.3-common php-pear php7.3-curl php7.3-dev php7.3-gd php7.3-mbstring php7.3-zip php7.3-mysql php7.3-xml php7.3-fpm libapache2-mod-php7.3 php7.3-imagick php7.3-recode php7.3-tidy php7.3-xmlrpc php7.3-intl
sudo apt-get install netcat openssl libpcre3 dnsmasq procps perl | |
# for ubuntu 16.04 (xenial) | |
sudo apt-get -y install postgresql postgresql-contrib phppgadmin | |
sudo -i -u postgres | |
psql | |
CREATE USER kong; CREATE DATABASE kong OWNER kong; | |
ALTER USER kong WITH password 'kong'; |