Skip to content

Instantly share code, notes, and snippets.

View tonio-m's full-sized avatar
🦝

Marco Vieira tonio-m

🦝
View GitHub Profile
@tonio-m
tonio-m / ablock-linkedin.md
Last active July 1, 2020 21:14
Bloquear as ads do linkedin no AdBlock/uBlock

Bloquear os Posts "Patrocinados" no Linkedin:

uBlock Origin

AdBlock

Ublock Origin

Ir em: Abrir Painel>Meus Filtros

@tonio-m
tonio-m / init.vim
Created September 3, 2020 02:34
set indentation function vim
command -nargs=1 SetTabSize call SetTabSize(<f-args>)
function SetTabSize(n)
let &l:tabstop=a:n
let &l:shiftwidth=a:n
let &l:softtabstop=a:n
endfunction
@tonio-m
tonio-m / pdf_dark_mode.sh
Created October 26, 2020 01:09
use ghostscript to invert colors of a pdf
#!/bin/bash
gs -o inverted.pdf \
-sDEVICE=pdfwrite \
-c "{1 exch sub}{1 exch sub}{1 exch sub}{1 exch sub} setcolortransfer" \
-f input.pdf

Heidegger - Being and Time

The Question

  • does stuff exist? - pressuposition: stuff is instead of exists - alias: Dasein - > and it doesn't matter if its qualia or methaphysical, because it still is phenomena, it is manifested no matter what side of the debate you are on

  • Dasein - being - is

@tonio-m
tonio-m / validate_cnpj.py
Created January 12, 2021 12:26
Função do python que valida cnpjs usando as normas do dataprev. (http://sa.previdencia.gov.br/site/2015/07/rgrv_RegrasValidacao.pdf)
def validate_cnpj(cnpj):
if len(cnpj) != 14 or len(set(cnpj)) == 1:
return False
def calculate_verifier(digits,multipliers):
multiplied_pairwise = [(int(x)*int(y)) for x,y in zip(digits,multipliers)]
sum_ = sum(multiplied_pairwise)
modulo = sum_ % 11
verifier = 0 if modulo < 2 else (11 - modulo)
return str(verifier)
@tonio-m
tonio-m / arch_install.sh
Last active June 27, 2022 08:12
Arch Linux Installation
# WIFI CONFIG
iwctl device list
iwctl station wlan0 scan
iwctl station wlan0 get-networks
iwctl station wlan0 connect wifi_name
# for automated setup
# pacman -Sy git
# git clone https://github.com/ChrisTitusTech/ArchTitus
@tonio-m
tonio-m / kinesis.py
Created March 2, 2021 15:16
kinesis put get example
import boto3
from pprint import pprint
client = boto3.client('kinesis', region_name='us-east-1')
def put():
response = client.put_record(
StreamName='teste',
@tonio-m
tonio-m / sqs.py
Created March 2, 2021 18:05
boto3 sqs get put exampĺe
import json
import boto3
from pprint import pprint
sqs = boto3.resource('sqs', region_name='us-east-1')
queue = sqs.Queue('https://sqs.us-east-1.amazonaws.com/666327610922/teste')
def get():
@tonio-m
tonio-m / insecure_deserialization.php
Created March 13, 2021 20:20
Exploiting php's unserialize function to inject arbitrary variables into __destruct magic method #(https://www.youtube.com/watch?v=jwzeJU_62IQ)
<?php
# helper function
const FAST_DESTRUCT_TEMP_KEY = 7896543210;
const FAST_DESTRUCT_FINAL_KEY = 7;
function process_object($object)
{
$key = FAST_DESTRUCT_TEMP_KEY;
return [$key => $object, $key + 1 => $key];
}
@tonio-m
tonio-m / docker.sh
Created March 29, 2021 23:46
Connecting to private IPs on the host's network from inside a docker container
docker network create -d bridge --subnet 192.168.0.0/24 --gateway 192.168.0.1 dockernet