Skip to content

Instantly share code, notes, and snippets.

View viniciuspereiras's full-sized avatar
:shipit:

Vinicius Pereira viniciuspereiras

:shipit:
View GitHub Profile
<?php
$token = $_COOKIE['token'];
$parts = explode('.', $token);
$signature = base64UrlEncode(
hash_hmac('sha256', $parts[0].'.'.$parts[1], 'segredinho_rs', true)
);
if($signature == $parts[2]){
$payload = json_decode(
<?php
function base64UrlEncode($data)
{
return str_replace(['+', '/', '='], ['-','_',''], base64_encode($data));
}
$key = 'secret';
$header = [
import random
class Map:
def __init__(self):
self.pos_a = ' '
self.pos_b = ' '
self.pos_c = ' '
self.pos_d = ' '
self.pos_e = ' '
<title>PoC</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcamjs/1.0.24/webcam.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@200&display=swap');
#my_camera {
margin-top: 50px;
width: 320px;
height: 240px;
border: 1px solid black;
}
@viniciuspereiras
viniciuspereiras / test_randons.py
Created September 28, 2021 05:07
random or not?
import numpy as np
import matplotlib.pyplot as plt
import random
class DataOc:
def __init__(self, number: int):
self.number = number
def _getOccurrences(self):
return self.number