Skip to content

Instantly share code, notes, and snippets.

@jhaddix
jhaddix / Testing_Checklist.md
Last active March 9, 2024 16:18 — forked from amotmot/WAHH_Task_Checklist.md
Fast Simple Appsec Testing Checklist
@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
@jnbek
jnbek / freebsd_defaults.txt
Created March 27, 2016 22:06
A debate about 'bad' FreeBSD defaults
https://vez.mrsk.me/freebsd-defaults.txt
#########################################################################
# FreeBSD - a lesson in poor defaults #
# Last updated 3/19/2016 #
# https://twitter.com/blakkheim #
#########################################################################
00) Intro
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"
#!/usr/bin/python
# -*- coding: utf-8 -*-
class cuenta_bancaria():
def __init__(self):
self.titular = "Fulano"
self.num_cuenta = "123456789"
self.saldo = 0
@mischief
mischief / openbsd-cheatsheet.md
Last active April 6, 2022 09:09
openbsd cheatsheet

openbsd cheatsheet

manuals

manuals: man(1), apropos(1)

  • man man - read the manual for the pkg_info command.
  • man 5 ethers - read a manual in a specific section, such as ethers(5)
  • apropos <manname> - search for manuals by name
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])
@psicobyte
psicobyte / Número Primos
Created August 6, 2013 11:53
Ejemplo para el Curso de Introducción a Python del Centro de Enseñanzas Virtuales de la Universidad de Granada
#!/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'
@salvianoo
salvianoo / ex36.py
Last active December 17, 2015 21:29
# 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