Skip to content

Instantly share code, notes, and snippets.

@dosanauthor
dosanauthor / Deploying PDF Tools Nextjs app On VPS using Docker, FileZilla, Nginx and Let's Encrypt SSL Certificates.txt
Last active March 9, 2024 09:05
Deploying PDF Tools Nextjs app On VPS using Docker, FileZilla, Nginx and Let's Encrypt SSL Certificates
Get Source code: https://codecanyon.net/item/pdf-tools-high-quality-pdf-tools-nextjs-react-web-application/44924651
WARNING: This item is exclusively sold on CodeCanyon under Envato Market licenses. Please do not purchase it from other sources, as they might be attempting to scam you.
#DNS Configuration
Add these two records to your DNS records:
Record 01:
Type: A Record, Host: @, Value: ip_address
Record 02:
Type: CNAME Record, Host: www, Value: domain-name
@jbrinley
jbrinley / opcache.preload.php
Created December 22, 2019 20:16
WordPress core opcache.preload
<?php
declare( strict_types=1 );
$wp_dir = '/application/www/wp/';
$preload_patterns = [
$wp_dir . "wp-includes/Text/Diff/Renderer.php",
$wp_dir . "wp-includes/Text/Diff/Renderer/inline.php",
$wp_dir . "wp-includes/SimplePie/**/*.php",
$wp_dir . "wp-includes/SimplePie/*.php",
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active May 1, 2024 22:04
crack activate Office on mac with license file
@mwpastore
mwpastore / 00README.md
Last active April 18, 2024 06:21
Lightning Fast WordPress: Caddy+Varnish+PHP-FPM

README

This gist assumes you are migrating an existing site for www.example.com — ideally WordPress — to a new server — ideally Ubuntu Server 16.04 LTS — and wish to enable HTTP/2 (backwards compatibile with HTTP/1.1) with always-on HTTPS, caching, compression, and more. Although these instructions are geared towards WordPress, they should be trivially extensible to other PHP frameworks, other FastCGI backends, and even non-FastCGI backends (using proxy in lieu of fastcgi in the terminal Caddyfile stanza).

Quickstart: Use your own naked and canonical domain names instead of example.com and www.example.com and customize the Caddyfile and VCL provided in this gist to your preferences!

These instructions target Varnish Cache 4.1, PHP-FPM 7.0, and Caddy 0.10. (I'm using MariaDB 10.1 as well, but that's not relevant to this guide.)

@lorentzca
lorentzca / index.html
Created October 4, 2016 15:07
ghost blog insite search box by algolia
<html>
<head>
<meta charset="utf-8" />
<style type="text/css">
.algolia-autocomplete {
width: 80%;
max-width: 710px;
}
.algolia-autocomplete .aa-input, .algolia-autocomplete .aa-hint {
width: 100%;
@remoteur
remoteur / decloudify_image
Last active April 30, 2022 08:18
decloudify_image
yum install -y libguestfs-tools
virt-filesystems --long -h --all -a rhev-m.init.qcow2
truncate -r rhev-m.init.qcow2 rhev-m.qcow2
truncate -s +100G rhev-m.qcow2
virt-resize --expand /dev/sda1 rhev-m.init.qcow2 rhev-m.qcow2
virt-customize -a rhev-m.qcow2 --root-password password:<pass>
virt-customize -a rhev-m.qcow2 --run-command 'yum remove -y cloud-init'
virt-customize -a rhev-m.qcow2 --run-command 'sed -i s/^PasswordAuthentication.*/PasswordAuthentication\ yes/ /etc/ssh/sshd_config'
virt-customize -a rhev-m.qcow2 --run-command 'sed -i s/^PermitRootLogin.*/PermitRootLogin\ yes/ /etc/ssh/sshd_config'