I hereby claim:
- I am paulofreitas on github.
- I am paulofreitass (https://keybase.io/paulofreitass) on keybase.
- I have a public key ASB7AILhT0J-sojxvGL7WGx81WH-wBn9xCWDeA3Euy5e-Qo
To claim this, I am signing this object:
{ | |
"openapi": "3.0.0", | |
"info": { | |
"title": "tip.cc API", | |
"description": "API for tip.cc", | |
"version": "0.1.1" | |
}, | |
"components": { | |
"securitySchemes": { | |
"apiKey": { |
- category: general | |
type: boolean | |
difficulty: easy | |
question: '"27 Club" is a term used to refer to a list of famous actors, musicians, and artists who died at the age of 27.' | |
correct_answer: 'True' | |
incorrect_answers: | |
- 'False' | |
- category: music | |
type: multiple | |
difficulty: hard |
I hereby claim:
To claim this, I am signing this object:
class Singleton(type): | |
_instances = {} | |
def __call__(cls, *args, **kwargs): | |
key = (cls, args, str(kwargs)) | |
if key not in cls._instances: | |
cls._instances[key] = super(Singleton, cls).__call__(*args, **kwargs) | |
return cls._instances[key] |
#!/usr/bin/env python3 | |
import argparse | |
from pyotp import totp # pip3 install pytotp | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser() | |
parser.add_argument('key') | |
args = parser.parse_args() | |
print(totp.TOTP(args.key).now()) |
server { | |
listen 80; | |
server_name domain.com www.domain.com; | |
root /home/username/domain.com/public; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
index index.html index.htm index.php; | |
charset utf-8; |
<?php | |
class TimeoutException extends RuntimeException | |
{ | |
// | |
} | |
function wait_until(callable $callback, $seconds) | |
{ | |
declare(ticks = 1); |
<?php | |
function namespace_path($namespace) | |
{ | |
try { | |
return (new ReflectionClass($namespace))->getFileName(); | |
} catch (ReflectionException $e) { | |
$autoloader = require base_path('vendor/autoload.php'); | |
$namespaceParts = array_filter(explode('\\', $namespace)); | |
$namespacePrefix = array_shift($namespaceParts) . '\\'; |
@extends('errors::layout') | |
@section('title', __('Unauthorized')) | |
@section('message', __($exception->getMessage())) |