Skip to content

Instantly share code, notes, and snippets.

View marcos-inja's full-sized avatar
:shipit:
creating bugs

MarcosVas marcos-inja

:shipit:
creating bugs
View GitHub Profile
@marcos-inja
marcos-inja / main.py
Created February 25, 2023 07:28
Basic implementation of Diffie-Hellman key exchange algorithm using python
a = 1
b = 3
n = 97
g = 5
x = (g**a) % n
y = (g**b) % n
k1 = (y**a) % n
@marcos-inja
marcos-inja / main.go
Created February 23, 2023 18:56
Implementing a pool in golang
package main
import (
"fmt"
"sync"
)
func main() {
var worker []int
for i := 0; i < 1000; i++ {
@eltondev
eltondev / API CPF Python
Created December 19, 2016 16:01
Consulta CPF Detran - Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests,sys,re
dados = {'nome':'','renach':'','cpf':'','dataNascimento':'','local':'','cfc':'','resultado':'', 'data':'','hora':''}
def get_dados(contents): # Regex tags XML
nome = re.search('<nome>(.*)</nome>',contents).group(0).replace('<nome>','').replace('</nome>','')
renach = re.search('<renach>(.*)</renach>',contents).group(0).replace('<renach>','').replace('</renach>','')
@banaslee
banaslee / XGH - en.txt
Last active July 17, 2024 16:13
eXtreme Go-Horse Process
eXtreme Go Horse (XGH) Process
Source: http://gohorseprocess.wordpress.com
1. I think therefore it's not XGH.
In XGH you don't think, you do the first thing that comes to your mind. There's not a second option as the first one is faster.
2. There are 3 ways of solving a problem: the right way, the wrong way and the XGH way which is exactly like the wrong one but faster.
XGH is faster than any development process you know (see Axiom 14).