Skip to content

Instantly share code, notes, and snippets.

View ojpojao's full-sized avatar
😏
só o creme papai

ojpojao ojpojao

😏
só o creme papai
View GitHub Profile
@ojpojao
ojpojao / user-config.yaml
Created April 8, 2023 00:10
cloud-init para XCP-NG
#cloud-config
# vim: syntax=yaml
# allow change hostname when false
preserve_hostname: false
# change hostname
hostname: {name}%
# setup /etc/hosts
manage_etc_hosts: true
disable_root: true
apt_preserve_sources_list: true
#! /usr/bin/env bash
# chmod +x init_setup.sh
# sudo ./init_setup.sh
dnf upgrade -y
dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm -y && \
dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm -y && \
dnf install vlc -y
rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg && \
@ojpojao
ojpojao / addVPNWindowsExample.md
Last active January 29, 2023 20:06
Criação de conxão VPN pelo PowerShell

Acesso VPN às redes Mefistófeles 🐧

Configuração da VPN sistemas Windows

  • abra um terminal do Powershell como administrador:

  • cole os comandos abaixos na tela do Powershell e tecle ENTER

$connName = "VPN SUPORTE"
@ojpojao
ojpojao / install_netbox.sh
Last active November 5, 2022 07:01
Realiza a instalação do NetBox com https
#!/usr/bin/env bash
# Tentativa de automatizar(porcamente) a instalação do Netbox kkkkkkk
# João Paulo dos Santos <ojpojao@gmail.com>
# Algum dia de outubro de 2022
# chmod +x install_netbox.sh
# execute com "sudo ./install_netbox.sh"
set -xe
@ojpojao
ojpojao / install_genieacs.sh
Last active June 6, 2024 11:21
Install GenieACS on Ubuntu 18.04 LTS
#! /usr/bin/env bash
## author: João Paulo <joaopaulo@ion.com.br, ojpojao@gmail.com>
set -xe
sudo apt update && sudo apt install -y dirmngr \
gnupg \
apt-transport-https \
ca-certificates \
software-properties-common
@ojpojao
ojpojao / index.html
Created November 19, 2021 17:29
Modelo de OS
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<meta charset="utf-8">
<div class="container" style="margin-left: 25px; margin-right: 25px;">
<div class="col-xs-12">
<div class="row page-header">
<div class="col-xs-4"><b class="text-left" style="font-size: 15px;">REQUISIÇÃO DE MATERIAL</b></div>
<div class="col-xs-6"><b class="text-center" style="font-size: 15px;">ORDEM DE SERVIÇO [[[tipo]]]</b></div>
<div class="col-xs-2"><span class="text-right" style="font-size: 15px;">Nº [[numero]]</span></div>
@ojpojao
ojpojao / main.py
Last active October 5, 2021 20:15
Problema grupo de Python
for indice, linha in Agenda.iterrows():
nome = linha['Nome']
numero = linha['Numero']
arquivo = linha['Arquivo']
texto = urllib.parse.quote(f'Olá {nome}! {mensagem}')
link = f'https://web.whatsapp.com/send?phone=55{numero}&text={texto}'
navegador.get(link)
@ojpojao
ojpojao / main.py
Created September 8, 2021 03:06
Algum problema em um grupo Python...
## Autor: João Paulo dos Santos <ojpojao@gmail.com>
## Data: 2021/09/08
import pandas as pd
csvfile = "dados.csv"
base = pd.read_csv(filepath_or_buffer=csvfile)
last_value = df['id'][0] # primeiro valor da coluna 'id'
count = -1 # acumula no máximo n vezes a quantidade que um valor estará em sequência. caso um próximo valor seja diferente, retorna a contagem para zero
@ojpojao
ojpojao / sh
Created October 14, 2020 19:02
Gen SHA512 password shadow with Python3 and Linux
python -c "import crypt, getpass; print(crypt.crypt(getpass.getpass(), crypt.mksalt(crypt.METHOD_SHA512)))"
@ojpojao
ojpojao / ks.cfg
Last active May 21, 2020 18:19
fedora test ks.cfg
#version=DEVEL
ignoredisk --only-use=sda
iscsiname iqn.1994-05.com.redhat:46a93490da59
autopart
# Partition clearing information
clearpart --none --initlabel
# Use graphical install
graphical
# Use CDROM installation media
cdrom