Skip to content

Instantly share code, notes, and snippets.

View LateButEarly's full-sized avatar
💭
Gas so high, I didn't get far.

LateButEarly LateButEarly

💭
Gas so high, I didn't get far.
View GitHub Profile
server {
server_name domain.com;
listen 443 ssl spdy;
root /home/webmaster/www/domain.com;
index index.php index.html;
# SSL configuration
ssl_certificate /home/webmaster/certs/domain.com.crt;
ssl_certificate_key /home/webmaster/certs/domain.com.key;
fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=Nginx:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
server {
listen 80;
server_name nginx.dev;
access_log /var/log/nginx/nginx.access.log;
root /var/www/nginx.dev/public/;
index index.html index.php;
<?php
/*
Plugin Name: GGA SSH2 Sample
Description: Sample SSH2 upload
Author: Pete Nelson (@GunGeekATX)
Version: 1.0
*/
if (!defined( 'ABSPATH' )) exit('restricted access');
<?php
/*
Usage:
$frag = new CWS_Fragment_Cache( 'unique-key', 3600 ); // Second param is TTL
if ( !$frag->output() ) { // NOTE, testing for a return of false
functions_that_do_stuff_live();
these_should_echo();
// IMPORTANT
$frag->store();
// YOU CANNOT FORGET THIS. If you do, the site will break.
@LateButEarly
LateButEarly / fs-my-addon.php
Created May 13, 2016 13:31 — forked from vovafeldman/fs-my-addon.php
Example of an add-on with Freemius that is activated only when the parent plugin is activated and loaded.
<?php
/*
Plugin Name: My Add-on
Version: 1.0.0
Author: Vova Feldman
Author URI: http://freemius.com
License: GPL2
*/
// Exit if accessed directly
@LateButEarly
LateButEarly / gist:ca4cab39a85359aea4972862daa95f38
Created June 25, 2018 17:58 — forked from sabarasaba/gist:3080590
Remove directory from remote repository after adding them to .gitignore
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master