Skip to content

Instantly share code, notes, and snippets.

View danielnunesdc's full-sized avatar
🎯
Focusing

Daniel Nunes danielnunesdc

🎯
Focusing
  • Assesso
  • Piauí
View GitHub Profile
import mysql.connector
try:
connection = mysql.connector.connect(host='foo.bar.com.br', database='foobar', user='foo', password='foobar2020')
# The string that you want to search.
seeked_value = "%8439742464%" # Like syntax
if connection.is_connected():
db_Info = connection.get_server_info()
@sidneys
sidneys / youtube_format_code_itag_list.md
Created January 20, 2018 11:12
YouTube video stream format codes itags

YouTube video stream format codes

Comprehensive list of YouTube format code itags

itag Code Container Content Resolution Bitrate Range VR / 3D
5 flv audio/video 240p - - -
6 flv audio/video 270p - - -
17 3gp audio/video 144p - - -
18 mp4 audio/video 360p - - -
22 mp4 audio/video 720p - - -
@williamdlm
williamdlm / git.md
Created January 7, 2018 17:44 — forked from leocomelli/git.md
Lista de comandos úteis do GIT

#GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@ErickMwazonga
ErickMwazonga / hashing.py
Created December 21, 2017 21:29
Hashing
import uuid
import hashlib
def hash_password(password):
# uuid is used to generate a random number
salt = uuid.uuid4().hex
return hashlib.sha256(salt.encode() + password.encode()).hexdigest() + ':' + salt
def check_password(hashed_password, user_password):
password, salt = hashed_password.split(':')
#testa colisão em um eixo e retorna verdadeiro ou falso
def test_colli(a, b, c, d):
if (a >= c and a <= d) or (b >= c and b <= d):
return True
return False
#posição x e y do canto esquerdo do retangulo
posX = input ()
posY = input ()
@rkhapov
rkhapov / hash.py
Last active February 25, 2018 16:08
hash
mod = 100
def my_hash(num):
return num % mod
keys = [ [] for i in range(mod) ]
values = [ [] for i in range(mod) ]
def set(key, value):
keys[my_hash(key)].append(key)
@miglen
miglen / aws-certification.md
Last active May 5, 2023 10:04
AWS Certification guide and notes on how to prepare for the aws associate certification architect, sysops and developer exams


AWS Certification notes

Those are my personal notes on AWS Solution Architect certification preparation. Hope you find them usefull.

To pass AWS certification, you should have:

  • Sound knowledge about most of the AWS services ( EC2, VPC, RDS, Cloudfront, S3, Route53 etc,)
  • Hands on experience with AWS services.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ErikRamses
ErikRamses / rsa.py
Created July 3, 2013 09:16
Algoritmo RSA (Incompleto)
#Algunas funciones fueron obtenidas de la siguiente URL: http://blog.hackxcrack.es/2011/11/introduccion-la-criptografia-moderna_09.html
import hashlib
import random
def hacerentero(s): #Se utiliza una funcion para hacer el mensaje a enteros
n = 0
for c in s:
n <<= 8 #evaluando los digitos ingresados por el usuario
n += ord(c) #se obtiene el orden de c