Skip to content

Instantly share code, notes, and snippets.

View BrianJM's full-sized avatar

Brian BrianJM

  • 13:30 (UTC -04:00)
View GitHub Profile
#Wordpress Sheet
#For verifying Core wordpress files
wp core verify-checksums
#For restricting auto update of wordpress
define( 'WP_AUTO_UPDATE_CORE', false );
#For increasing memory limit
define('WP_MEMORY_LIMIT', '256M');
@maxkostinevich
maxkostinevich / index.html
Last active March 28, 2025 02:30
Cloudflare Worker - Handle Contact Form
<!--
/*
* Serverless contact form handler for Cloudflare Workers.
* Emails are sent via Mailgun.
*
* Learn more at https://maxkostinevich.com/blog/serverless-contact-form
* Live demo: https://codesandbox.io/s/serverless-contact-form-example-x0neb
*
* (c) Max Kostinevich / https://maxkostinevich.com
*/
@jamilnyc
jamilnyc / thumbnail.js
Created July 23, 2016 03:55
Create a thumbnail from a PDF in Node
var gm = require('gm');
// Create JPG from page 0 of the PDF
gm("file.pdf[0]") // The name of your pdf
.setFormat("jpg")
.resize(200) // Resize to fixed 200px width, maintaining aspect ratio
.quality(75) // Quality from 0 to 100
.write("/tmp/cover.jpg", function(error){
// Callback function executed when finished
if (!error) {