Skip to content

Instantly share code, notes, and snippets.

// npm install prerendercloud
require('prerendercloud')
.screenshot("https://google.com")
.then(jpgBuffer => fs.writeFileSync("out.jpg", jpgBuffer));
require('prerendercloud')
.pdf("https://google.com")
.then(pdfBuffer => fs.writeFileSync("out.pdf", pdfBuffer));
@paragonie-scott
paragonie-scott / crypto-wrong-answers.md
Last active April 21, 2024 23:48
An Open Letter to Developers Everywhere (About Cryptography)
///
/// Simple pooling for Unity.
/// Author: Martin "quill18" Glaude (quill18@quill18.com)
/// Latest Version: https://gist.github.com/quill18/5a7cfffae68892621267
/// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/)
/// UPDATES:
/// 2015-04-16: Changed Pool to use a Stack generic.
///
/// Usage:
///
@pixelrevision
pixelrevision / PixelPerfectCam.cs
Last active January 26, 2024 05:23
Script for unity to create a pixel locked orthogonal camera
using UnityEngine;
/**
* A camera to help with Orthagonal mode when you need it to lock to pixels. Desiged to be used on android and retina devices.
*/
public class PixelPerfectCam : MonoBehaviour {
/**
* The target size of the view port.
*/
public Vector2 targetViewportSizeInPixels = new Vector2(480.0f, 320.0f);
/**