Skip to content

Instantly share code, notes, and snippets.

@K4bl0-Skat3R
K4bl0-Skat3R / pf.conf
Created October 9, 2017 08:04 — forked from rosstimson/pf.conf
Basic FreeBSD PF firewall for web server - /etc/pf.conf
# vim: set ft=pf
# /etc/pf.conf
ext_if="vtnet0"
webports = "{http, https}"
int_tcp_services = "{domain, ntp, smtp, www, https, ftp}"
int_udp_services = "{domain, ntp}"
set skip on lo
# basic pfctl control
# ==
# Related: http://www.OpenBSD.org
# Last update: Tue Dec 28, 2004
# ==
# Note:
# this document is only provided as a basic overview
# for some common pfctl commands and is by no means
# a replacement for the pfctl and pf manual pages.
def soma_matrizes(A, B):
soma = [[A[i][j] + B[i][j] for j in range(len(B[0]))]
for i in range(len(A))]
return soma if soma_possivel(A, B) else "As matrizes nao sao nxn"
def mult_matrizes(A, B):
mult = [[sum(A[i][k] * B[k][j] for k in range(len(B)))
for j in range(len(B[0]))] for i in range(len(A))]
return mult if mult_possivel(A, B) else "Operacao nao eh possivel"