Skip to content

Instantly share code, notes, and snippets.

View rhaymisonbetini's full-sized avatar
🎯
Focusing

Rhaymison Betini rhaymisonbetini

🎯
Focusing
  • Brasil
View GitHub Profile
@rafael-neri
rafael-neri / validar_cpf.php
Last active November 14, 2024 13:39
Validar CPF em PHP (Completo)
<?php
function validaCPF($cpf) {
// Extrai somente os números
$cpf = preg_replace( '/[^0-9]/is', '', $cpf );
// Verifica se foi informado todos os digitos corretamente
if (strlen($cpf) != 11) {
return false;
@RaminNietzsche
RaminNietzsche / image_stof.py
Created April 9, 2017 10:57
Python flask upload base64 image
import base64
from io import BytesIO
from PIL import Image
file = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcAAAAHACAYAAAA1JbhzAAAgAElEQVR4Xoy96ZKt3XKVt5p97pmgMSDAdI6wABMWdiB+yEgQQoBN38h34HMkjiTEraCqtYgc4xmZOd+qT+EtON/eVWu9zZzZjBzZzPuf+Y2fv+/v2+19e91u98ftcb/dPl/v2/N2v71v79vtdr/Vb+s/79dNfx6P2+31ft/u9/pd/fau79W/3++60ut2fz1ut4e/7c/oJvrM/f6+vd/32+N9u32+b7rXq65/e90e9/re+/aqX9Rn+b7+w/1ubz+Zf1T3vt9eLz9cninfrWeuF6zn0mfrWd5ctV6cN6z3edyft9f7k2f0c75u79vj9tSz1bff70/97FnP+ao3rcd91EvUwun56xO1IHlGrdn9x+19+6yFu9Vb1RvkWe+v9+398HrUf+tVtMZcoR5Tz32v+7/0NJ999R+35+2z/13Xut/rYW5a07qK//eu79Uz1Xp/1lPUhete7/utlqT++al98P77+/lTT+Br1XPWs2kv65lrP0oAstestaRHH6h7WTYe9bs361wXuj18LV3zfnve57m1T6/b7VnXrjUq2by9bz/qWWu5tY48T/2s9roeMz971bVqvfIutX7elfqZJful69Sf+p3ur/evfaxrzi6+63k/7tprfRe5q2vVn+zJo/5dz/L0Netr9f4fklGvWcmsZarWxd/V52rj37W/dU0/u69bP3/d7qVfev/77V6y8raEavV41Fon3VfX9nUka6UHein//zeyohW4l3RoEdBWXQQLUM9dMuUb1Ecsu++2A+9Xyf7T+lA/r/dHDu6lz+icf1bPW+vw0p56S7APWleLWq3vo97x86131f3Qn9ipeo96z3qtkpHS+/f9pWtKFPQ6tRYlZ/V/slYtuyUfdcO6V62tzCDrV+8ou1