Skip to content

Instantly share code, notes, and snippets.

View isaqueprofeta's full-sized avatar
🎯
Focusing

Isaque Profeta isaqueprofeta

🎯
Focusing
View GitHub Profile
#!/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' => [
@isaqueprofeta
isaqueprofeta / zabbix_queries.sh
Last active May 5, 2024 16:43 — forked from jsidhu/gist:766e4e85193f89c94640495959eb5620
Curl post to zabbix api (api_jsonrpc.php)
#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
@isaqueprofeta
isaqueprofeta / start.sh
Created October 25, 2017 16:14
My start script for customized laradock showing IP's
#!/bin/bash
if [ $# -lt 1 ]
then
echo "Uso : $0 Stack a ser usado (zabbix/webdev)"
exit
fi
case "$1" in
@isaqueprofeta
isaqueprofeta / pdfunite.sh
Created November 7, 2017 16:58
Pdftk to unite all files in a folder
#!/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)));
@isaqueprofeta
isaqueprofeta / docker-compose.yml
Last active April 17, 2020 18:25
Postgres and Pgadmin4 with volumes
version: '2'
volumes:
db_data:
driver: local
pgadmin_data:
driver: local
services:
db:
@isaqueprofeta
isaqueprofeta / Dockerfile
Created March 7, 2018 23:00
phpipam_docker_72
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
@isaqueprofeta
isaqueprofeta / php_zabbix_api.md
Last active April 17, 2020 18:25
Usando a API do zabbix rapidamente em PHP

Instalar PHP:

sudo apt-get install php7.0 php7.0-cli php7.0-common php7.0-curl

Instalar Composer:

sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
sudo php composer-setup.php
sudo php -r "unlink('composer-setup.php');"