This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function base64UrlEncode($data) | |
{ | |
return str_replace(['+', '/', '='], ['-','_',''], base64_encode($data)); | |
} | |
$key = 'secret'; | |
$header = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
class Map: | |
def __init__(self): | |
self.pos_a = ' ' | |
self.pos_b = ' ' | |
self.pos_c = ' ' | |
self.pos_d = ' ' | |
self.pos_e = ' ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |