Skip to content

Instantly share code, notes, and snippets.

body { font-family: Arial, Helvetica, sans-serif; background-color: #fffaf7; } main { max-width: 38rem; padding: 2rem; margin: auto; } header {

@pakmans
pakmans / sicp-notes.md
Last active October 27, 2018 06:07
SICP Notes

(define ⟨name⟩ ⟨value⟩)

The general form of a procedure definition is (define (⟨name⟩ ⟨formal parameters⟩) ⟨body⟩)

The general form of a conditional expression (case analysis) is: (cond (⟨p₁⟩ ⟨e₁⟩) (⟨p₂⟩ ⟨e₂⟩) …

Keybase proof

I hereby claim:

  • I am pakmans on github.
  • I am pakman (https://keybase.io/pakman) on keybase.
  • I have a public key ASADso18kZo3jQKLmPGjNCQlTqXnMxA8Tl8SLMTpfxBbLQo

To claim this, I am signing this object:

@pakmans
pakmans / RFC y CURP regex
Last active June 27, 2023 15:31 — forked from gerardorochin/rfc regex
Expresion regular para validar RFC
/^([A-Z,Ñ,&]{3,4}([0-9]{2})(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[A-Z|\d]{3})$/i
/^([A-Z]{4}([0-9]{2})(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[HM](AS|BC|BS|CC|CL|CM|CS|CH|DF|DG|GT|GR|HG|JC|MC|MN|MS|NT|NL|OC|PL|QT|QR|SP|SL|SR|TC|TS|TL|VZ|YN|ZS|NE)[A-Z]{3}[0-9A-Z]\d)$/i
@pakmans
pakmans / git-eg
Last active December 19, 2015 09:09
Common git commands
# Show local and remote branches
git branch -a
# Checkout remote branch:
git checkout -b my_branch origin/my_branch
# (-b my_branch crea y te cambia a dicho branch local)
@pakmans
pakmans / fibonacci-1.py
Last active December 18, 2015 16:58
Naive implementation to get the nth element of the Fibonacci sequence
""" Naive implementation to get the nth element of the Fibonacci sequence """
def fib(n):
if n == 0:
return 0
elif n == 1:
return 1
else:
return fib(n-1) + fib(n-2)