sudo apt-get install php7.0 php7.0-cli php7.0-common php7.0-curl
sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
sudo php composer-setup.php
sudo php -r "unlink('composer-setup.php');"
#!/bin/sh | |
for f in *.mp4; | |
do | |
HandBrakeCLI -i "$f" -o "${f}.m4v" --preset="480p"; | |
done | |
use GuzzleHttp\Client; | |
class yourController extends Controller { | |
public function saveApiData() | |
{ | |
$client = new Client(); | |
$res = $client->request('POST', 'https://url_to_the_api', [ | |
'form_params' => [ |
#LOGIN | |
curl -i -X POST -H 'Content-type:application/json' -d '{"jsonrpc":"2.0","method":"user.login","params":{ "user":"myUserName","password":"myPassword"},"auth":null,"id":0}' https://zabbix.server/api_jsonrpc.php | |
#GET ALL HOSTS WITH NAME | |
curl -i -X POST -H 'Content-type:application/json' -d '{"jsonrpc":"2.0","method":"host.get","params":{"output": ["hostid", "name"]},"auth":"<AUTH_KEY>","id":0}' https://zabbix.server/api_jsonrpc.php | |
#GET ALL HOSTS WITH NAME, HOSTNAME AND IP ADDRESS | |
curl -i -X POST -H 'Content-type:application/json' -d '{"jsonrpc":"2.0","method":"host.get","params":{"output":["hostid", "host", "name"], "selectInterfaces":["ip"]},"auth":"<AUTH_KEY>","id":0}' https://zabbix.server/api_jsonrpc.php |
#!/bin/bash | |
if [ $# -lt 1 ] | |
then | |
echo "Uso : $0 Stack a ser usado (zabbix/webdev)" | |
exit | |
fi | |
case "$1" in |
#!/bin/bash | |
pdftk *.pdf cat output combined.pdf |
<?php | |
$in = <<<'JSON' | |
[ | |
{ | |
"Date": "2014-12-01", | |
"StartTime": "10:00", | |
"EndTime": "16:00" | |
}, | |
{ |
<?php | |
use Illuminate\Support\Facades\DB; | |
$query = "SELECT tables.table_name, columns.column_name, columns.data_type, columns.udt_name FROM information_schema.tables AS tables JOIN information_schema.columns AS columns ON tables.table_name = columns.table_name WHERE tables.table_type = 'BASE TABLE' AND tables.table_schema NOT IN ('pg_catalog', 'information_schema')"; | |
$data = json_decode(collect(DB::select($query))); |
version: '2' | |
volumes: | |
db_data: | |
driver: local | |
pgadmin_data: | |
driver: local | |
services: | |
db: |
FROM php:7.2-apache | |
MAINTAINER Pierre Cheynier <pierre.cheynier@gmail.com> | |
ENV PHPIPAM_SOURCE https://github.com/phpipam/phpipam/ | |
ENV PHPIPAM_VERSION 1.3.1 | |
ENV PHPMAILER_SOURCE https://github.com/PHPMailer/PHPMailer/ | |
ENV PHPMAILER_VERSION 5.2.21 | |
ENV PHPSAML_SOURCE https://github.com/onelogin/php-saml/ | |
ENV PHPSAML_VERSION 2.10.6 | |
ENV WEB_REPO /var/www/html |