Skip to content

Instantly share code, notes, and snippets.

@LuFerLux
LuFerLux / Boleta.xml
Created February 7, 2020 14:54 — forked from giansalex/Boleta.xml
Comprobantes Facturación Electrónica SUNAT UBL 2.1 (Factura, Boleta, Nota de Crédito, Nota de Débito, ICBPER), generados con Greenter https://giansalex.github.io/greenter
<?xml version="1.0" encoding="UTF-8"?>
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2">
<ext:UBLExtensions>
<ext:UBLExtension />
</ext:UBLExtensions>
<cbc:UBLVersionID>2.1</cbc:UBLVersionID>
<cbc:CustomizationID>2.0</cbc:CustomizationID>
<cbc:ID>B001-1</cbc:ID>
<cbc:IssueDate>2018-10-15</cbc:IssueDate>
<cbc:IssueTime>00:44:53</cbc:IssueTime>
--
-- EJEMPLO N° 1
--
-- TABLAS
create table cabecera(
codigo char(2),
observacion varchar(200),
tipo char(1),
@LuFerLux
LuFerLux / FileDownloader.cs
Created September 25, 2018 18:37 — forked from yasirkula/FileDownloader.cs
C# Download Public File From Google Drive™ (works for large files as well)
using System;
using System.IO;
using System.Net;
public static class FileDownloader
{
private const string GOOGLE_DRIVE_DOMAIN = "drive.google.com";
private const string GOOGLE_DRIVE_DOMAIN2 = "https://drive.google.com";
// Normal example: FileDownloader.DownloadFileFromURLToPath( "http://example.com/file/download/link", @"C:\file.txt" );
@LuFerLux
LuFerLux / function.cast.php
Created July 23, 2018 21:10 — forked from borzilleri/function.cast.php
PHP function to cast an object from one class to another.
<?php
/**
* Cast an object into a different class.
*
* Currently this only supports casting DOWN the inheritance chain,
* that is, an object may only be cast into a class if that class
* is a descendant of the object's current class.
*
* This is mostly to avoid potentially losing data by casting across
* incompatable classes.
<?php
# File: app\Http\Middleware\CORS.php
# Create file with below code in above location. And at the end of the file there are other instructions also.
# Please check.
namespace App\Http\Middleware;
use Closure;
class CORS {