Skip to content

Instantly share code, notes, and snippets.

View isaqueprofeta's full-sized avatar
🎯
Focusing

Isaque Profeta isaqueprofeta

🎯
Focusing
View GitHub Profile
<?php
$in = <<<'JSON'
[
{
"Date": "2014-12-01",
"StartTime": "10:00",
"EndTime": "16:00"
},
{
@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
@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
use GuzzleHttp\Client;
class yourController extends Controller {
public function saveApiData()
{
$client = new Client();
$res = $client->request('POST', 'https://url_to_the_api', [
'form_params' => [
#!/bin/sh
for f in *.mp4;
do
HandBrakeCLI -i "$f" -o "${f}.m4v" --preset="480p";
done
@isaqueprofeta
isaqueprofeta / 1_calc_sem_funcao.py
Created May 6, 2020 02:16
Calculadora com e sem função
#!/usr/bin/python3.6
# Pega a Operação
operacao = input("""
Bem vindo a calculadora de dois valores.
Opções:
1 para soma.
2 para subtração.
3 para multiplicação.
4 para divisão.
@isaqueprofeta
isaqueprofeta / download.py
Created May 8, 2020 16:12
My first test with scrappy
import scrapy
from scrapy.http import Request
class SheetDownloader(scrapy.Spider):
name = 'my_downloader'
allowed_domains = ['mydomain.com']
start_urls = [f'https://mydomain.com/path/list/{page}' for page in range(1, 100)]
def parse(self, response):
@isaqueprofeta
isaqueprofeta / zabbix_install.md
Last active May 22, 2020 21:16
Zabbix stupid simple install

Install Zabbix with PgSQL, stupid mode (all modules on one machine and disable security of S.O) in CentOS7:

SO:

$ vi /etc/selinux/config 

Edit replacing:

@isaqueprofeta
isaqueprofeta / zabbix_lld_json.py
Last active June 19, 2020 01:56
Modelo base para criar saídas lld para o zabbix
#!/usr/bin/python3.5
# Bibliotecas necessárias
import json,collections
# Prepara container lld do zabbix
# Versão < 4.2:
# lld = { 'data' : [] }
# Versão >= 4.2:
lld = []
@isaqueprofeta
isaqueprofeta / download_springer.py
Last active June 22, 2020 13:36
Download dos livros grátis da Springer
import requests
import csv
import os
# PREREQUISITOS:
# Python3.6 com bilbioteca Requests
# Script para download dos livros:
# https://www.hardmob.com.br/threads/744521-Springer-PDF-Livros-da-Editora-Springer-DE-GRACA-negocios-engenharia-medicina