A combination of my own methodology and the Web Application Hacker's Handbook Task checklist, as a Github-Flavored Markdown file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://vez.mrsk.me/freebsd-defaults.txt | |
######################################################################### | |
# FreeBSD - a lesson in poor defaults # | |
# Last updated 3/19/2016 # | |
# https://twitter.com/blakkheim # | |
######################################################################### | |
00) Intro |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
class cuenta_bancaria(): | |
def __init__(self): | |
self.titular = "Fulano" | |
self.num_cuenta = "123456789" | |
self.saldo = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Matriz(object): | |
def __init__(self, mat): | |
self.mat = mat | |
def linhas(self): | |
return len(self.mat) | |
def colunas(self): | |
return len(self.mat[0]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
for numero in range(2,100): | |
for divisor in range(2,numero): | |
if numero % divisor == 0: | |
print numero, 'es múltiplo de', divisor, 'y', numero/divisor | |
break | |
else: | |
print numero, 'es un número primo' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=UTF-8 | |
""" | |
Desenvolva um programa que faça a tabuada de um número qualquer inteiro que será digitado pelo usuário, mas a tabuada não deve necessariamente iniciar em 1 e terminar em 10, o valor inicial e final devem ser informados também pelo usuário, conforme exemplo abaixo: | |
Montar a tabuada de: 5 | |
Começar por: 4 | |
Terminar em: 7 | |
Vou montar a tabuada de 5 começando em 4 e terminando em 7: | |
5 X 4 = 20 | |
5 X 5 = 25 |