Skip to content

Instantly share code, notes, and snippets.

@ilkermutlu
ilkermutlu / convert.md
Last active April 9, 2024 11:23
Convert PDF file to v1.4
// Not much of PHP magic
// This just takes a PDF file from a path
// and executes Ghostscript to convert your
// PDF to version 1.4

// You need to have Ghostscript installed
// See https://www.ghostscript.com/Documentation.html

$PDFFile = '/path/to/your/pdf.pdf';
@formerandroider
formerandroider / fastboot_commands.txt
Last active November 27, 2022 00:32 — forked from zhuowei/fastboot_commands.txt
Huawei Nexus 6P Angler fastboot commands
List grabbed from running `strings` on the bootloader; it's probably incomplete.
Most of these commands are untested, and all of them sound like they can seriously break your phone. Be careful.
Tested: (all on a bootloader unlocked device)
fastboot oem uart enable: changes "Console" on the bootloader screen to say "ttyHSL0,115200,n8";
probably enables serial messages; haven't checked since I don't know where the Nexus 6P's uart is
fastboot oem ramdump enable: changes "Download mode" on the bootloader screen to say "ENABLED" instead of "DISABLED".
@maccath
maccath / gist:3981205
Created October 30, 2012 16:09
Split PDF to individual pages using FPDI and FPDF
<?php
/**
* Split PDF file
*
* <p>Split all of the pages from a larger PDF files into
* single-page PDF files.</p>
*
* @package FPDF required http://www.fpdf.org/
* @package FPDI required http://www.setasign.de/products/pdf-php-solutions/fpdi/