Skip to content

Instantly share code, notes, and snippets.

View sistematico's full-sized avatar
🎯
Focusing

Lucas Brum sistematico

🎯
Focusing
View GitHub Profile
@sistematico
sistematico / README.md
Created December 23, 2019 06:27 — forked from eric1234/README.md
Protect page with simple password

Purpose

Unauthorized access to a PHP page prompts the user for a password. Once the password is entered the original page will show.

Features

  • The access is recorded in the session so it only needs to be
@sistematico
sistematico / estados-cidades.json
Created July 1, 2020 07:33 — forked from letanure/estados-cidades.json
JSON estados cidades do brasil, dividido por estados. segunda lista atualizada em 2020, dados do IBGE
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@sistematico
sistematico / validation-cpf.js
Created August 31, 2020 17:18 — forked from joaohcrangel/validation-cpf.ts
Função para validar CPF
function isValidCPF(number) {
var sum;
var rest;
sum = 0;
if (number == "00000000000") return false;
for (i=1; i<=9; i++) sum = sum + parseInt(number.substring(i-1, i)) * (11 - i);
rest = (sum * 10) % 11;
if ((rest == 10) || (rest == 11)) rest = 0;
@sistematico
sistematico / kiwiirc-nginx.conf
Last active September 9, 2020 12:00 — forked from ItsOnlyBinary/kiwiirc-nginx.conf
Nginx + KiwiIRC Reverse Proxy
server {
listen 80;
listen [::]:80;
server_name chat.site.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
@sistematico
sistematico / stream_to_youtube.sh
Created March 3, 2021 16:36 — forked from olasd/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
@sistematico
sistematico / async_ydl.py
Created December 6, 2021 13:36 — forked from lanfon72/async_ydl.py
integrate youtube_dl with asyncio.
import asyncio
from datetime import datetime
from functools import partial
from concurrent.futures import ProcessPoolExecutor
from youtube_dl import YoutubeDL as YDL
PPE = ProcessPoolExecutor()
@sistematico
sistematico / index.html
Created January 19, 2022 11:08 — forked from gdams/index.html
Webssh
<!doctype html>
<html>
<head>
<title>SSH Client</title>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/socket.io/1.3.5/socket.io.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<style>
body {
margin: 0;
padding: 0;
@sistematico
sistematico / gist:5f34e3d8036f90ea3dfd35f6f4151329
Created March 19, 2022 23:52 — forked from felladrin/gist:1800645
Código PHP para listar subpastas com links
<?php
if ($diretorio = opendir("./"))
{
while(false !== ($pasta = readdir($diretorio)))
{
if(is_dir($pasta) and ($pasta != ".") and ($pasta != ".."))
{
echo "<a href='$pasta'>$pasta</a><br>";
}
}
@sistematico
sistematico / certbot setup guideline.md
Created July 20, 2022 23:09 — forked from AoiYamada/certbot setup guideline.md
Certbot auto renew SSL guideline for CentOS 6, 7

Certbot auto renew SSL guideline for CentOS 6, 7

Sign a ssl cert and renew by cronjob.

Prerequisite

softwares:

  • wget
  • nginx
  • nano