Skip to content

Instantly share code, notes, and snippets.

View lecano's full-sized avatar
🧩
Focusing

Luis Cano lecano

🧩
Focusing
  • Perú
View GitHub Profile
@lecano
lecano / dnisunat-call.js
Last active May 3, 2019 17:58
dnisunat-call
var data = new FormData();
data.append("dni", "06477277");
data.append("token", "de17febe-402a-4177...");
var xhr = new XMLHttpRequest();
xhr.open("POST", "https://api.migoperu.pe/api/v1/dni");
xhr.setRequestHeader("Accept", "application/json");
xhr.send(data);
@lecano
lecano / openreadzip.cs
Last active October 16, 2017 02:02
Open zip file in memory and read/open each file using .NET and C#
using System.IO.Compression;
using System.IO;
namespace openreadzip
{
class Program
{
static void Main(string[] args)
{
using (var file = File.OpenRead("MyFile.zip"))