Skip to content

Instantly share code, notes, and snippets.

View brunoinds's full-sized avatar

Bruno Freire brunoinds

View GitHub Profile
@brunoinds
brunoinds / dompdf-with-progress-callback.php
Created April 30, 2024 17:45
DomPDF Render with Progress Callback
<?php
use Dompdf\Dompdf;
$totalFramesToRenderCount = 0;
$finishedFramesToRenderCount = 0;
$onProgress = function($percentage, $framesRendered, $framesTotal){
//This is the callback that will be called every progress change
var_dump($percentage, $framesRendered, $framesTotal);
!function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);throw(f=new Error("Cannot find module '"+i+"'")).code="MODULE_NOT_FOUND",f}c=n[i]={exports:{}},e[i][0].call(c.exports,function(r){return o(e[i][1][r]||r)},c,c.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({1:[function(require,module,exports){const escope=require("escope"),esprima=require("esprima");class EscopeTree{static analyze(code){code=esprima.parse(code);return escope.analyze(code).acquire(code)}}window&&(window.EscopeTree=EscopeTree),exports.EscopeTree=EscopeTree},{escope:7,esprima:15}],2:[function(require,module,exports){!function(global){!function(){"use strict";var objectAssign=require("object-assign");function compare(a,b){if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0}function isBuffer(b){return g
@brunoinds
brunoinds / instascan.min.js
Created July 19, 2023 14:39
Instascan.min.js with Back/Rear camera enabled
This file has been truncated, but you can view the full file.