I hereby claim:
- I am nicolaiarocci on github.
- I am nicolaiarocci (https://keybase.io/nicolaiarocci) on keybase.
- I have a public key whose fingerprint is 3E83 939B 0635 B124 805A EB07 3CE7 F44C 719B 8FC6
To claim this, I am signing this object:
from flask import Flask, request | |
app = Flask(__name__) | |
def parse_request(): | |
commands = {0:'L', 1:'H', 2:'U', 3:'K', 4:'W'} | |
cmd = commands.get(request.args.get("cmd", type=int)) | |
pin = request.args.get("pin") | |
if pin: |
var committente = new CessionarioCommittente(); | |
committente.IdentificativiFiscali.CodiceFiscale = "01180680397"; | |
committente.AltriDatiIdentificativi.Denominazione = "CIR 2000"; | |
committente.AltriDatiIdentificativi.Sede.Indirizzo = "Via Sansovino 45"; | |
committente.AltriDatiIdentificativi.Sede.CAP = "48124"; | |
committente.AltriDatiIdentificativi.Sede.Comune = "Ravenna"; | |
var fattura = new DatiFatturaBody(); | |
fattura.DatiGenerali.Data = DateTime.Now; | |
fattura.DatiGenerali.TipoDocumento = "TD01"; |
import copy | |
from cerberus import Validator | |
from cerberus import errors | |
from collections import Mapping, Sequence | |
class ObjectValidator(Validator): | |
def __init__(self, *args, **kwargs): |
<?xml version="1.0" encoding="UTF-8"?> | |
<SetupPrereq> | |
<conditions> | |
<condition Type="16" Comparison="2" Path="[WindowsFolder]Microsoft.NET\Framework\v4.0.30319" FileName="mscorlib.dll" ReturnValue="4.0.30319.233"></condition> | |
<condition Type="1" Comparison="2" Path="HKEY_LOCAL_MACHINE\SOFTWARE\wow6432node\Microsoft\Updates\Microsoft .NET Framework 4 Extended\KB2468871\" FileName="" ReturnValue=""></condition> | |
<condition Type="1" Comparison="2" Path="HKEY_LOCAL_MACHINE\SOFTWARE\wow6432node\Microsoft\Updates\Microsoft .NET Framework 4 Client Profile\KB2468871\" FileName="" ReturnValue=""></condition> | |
</conditions> | |
<operatingsystemconditions> | |
<operatingsystemcondition MajorVersion="5" MinorVersion="2" PlatformId="2" CSDVersion="" Bits="4" ProductType="1" ServicePackMajorMin="3"></operatingsystemcondition> | |
<operatingsystemcondition MajorVersion="5" MinorVersion="2" PlatformId="2" CSDVersion="" Bits="4" ProductType="2|3" ServicePackMajorMin="2"></operatingsystemcondition> |
I hereby claim:
To claim this, I am signing this object:
# -*- coding: utf-8 -*- | |
""" | |
Auth-SHA1/HMAC | |
~~~~~~~~~~~~~~ | |
Securing an Eve-powered API with Basic Authentication (RFC2617). | |
This script assumes that user accounts are stored in a MongoDB collection | |
('accounts'), and that passwords are stored as SHA1/HMAC hashes. All API |
# -*- coding: utf-8 -*- | |
""" | |
Auth-BCrypt | |
~~~~~~~~~~~ | |
Securing an Eve-powered API with Basic Authentication (RFC2617). | |
This script assumes that user accounts are stored in a MongoDB collection | |
('accounts'), and that passwords are stored as BCrypt hashes. All API |
@mimerender( | |
default = 'html', | |
html = render_html, | |
xml = render_xml, | |
json = render_json, | |
txt = render_txt | |
) | |
def index(): | |
if request.method == 'GET': | |
return {'message': 'Hello, World!'} |
render_xml = lambda message: '<message>%s</message>' % message | |
render_json = jsonify | |
render_html = lambda message: '<html><body>%s</body></html>' % message | |
render_txt = lambda message: message |
$ curl -H "Accept: application/html" localhost:5000/ | |
<html><body>Hello, World!</body></html> | |
$ curl -H "Accept: application/xml" localhost:5000/ | |
<message>Hello, World!</message> | |
$ curl -H "Accept: application/json" localhost:5000/ | |
{'message':'Hello, World!'} | |
$ curl -H "Accept: text/plain" localhost:5000/ |