Skip to content

Instantly share code, notes, and snippets.

@sthembi
sthembi / getPhpServerVariables.php
Last active September 6, 2022 20:51 — forked from Shohan494/getPhpServerVariables.php
basic php server variables
<?php
$indicesServer = array('PHP_SELF',
'argv',
'argc',
'GATEWAY_INTERFACE',
'SERVER_ADDR',
'SERVER_NAME',
'SERVER_SOFTWARE',
'SERVER_PROTOCOL',
'REQUEST_METHOD',

Client Team - First Round - ASAP

  • Add CNAME for admin.originalsite.com to point to global.prod.fastly.net
  • Add Reverse Proxy directive to Virtual Host on finalsite.com

Client Team - Second Round

  • Set Blog content addition freeze
  • Make sure blog is excluded from GeoIP rules

LimeCuda Pre-Launch List

  • Copy Fastly config to Live Fastly setup.
@sthembi
sthembi / reverse-proxy.php
Last active December 21, 2020 12:53 — forked from JamesPaden/reverse-proxy.php
Wordpress Reverse Proxy Plugin
<?php
/**
* @package Reverse Proxy
*/
/*
Plugin Name: Reverse Proxy
Plugin URI: https://instrumentalapp.com/
Description: Reverse proxy setup for Instrumental blog
Version: 1.0
Author: James Paden
@sthembi
sthembi / TransmitOpenTerminal.txt
Last active August 20, 2018 02:39 — forked from johnfmorton/TransmitOpenTerminal.txt
Use Transmit 5 to open in iTerm (instead of Terminal.app) as mentioned here https://library.panic.com/transmit5/open-in-terminal/
on openTerminal(location, remoteHost, serverPort)
tell application "System Events"
-- some versions might identify as "iTerm2" instead of "iTerm"
set isRunning to (exists (processes where name is "iTerm")) or (exists (processes where name is "iTerm2"))
end tell
tell application "iTerm"
activate
@sthembi
sthembi / userChrome.css
Last active December 29, 2017 17:03 — forked from AnthonyDiGirolamo/userChrome.css
thunderbird custom style for message and folder pane list
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
/* Row Height*/ treechildren::-moz-tree-row {
margin-top: 2px !important;
margin-bottom: 2px !important;
}
/* Set Font Size In Folder Pane */
@sthembi
sthembi / .htaccess
Created October 15, 2017 20:45 — forked from neverything/.htaccess
WordPress behind a reverse proxy.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /blog/
RewriteBase /~accountname/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule . /blog/index.php [L]
RewriteRule . /~accountname/index.php [L]
@sthembi
sthembi / feedly_export_saved_for_later
Last active September 21, 2015 04:44 — forked from bradcrawford/feedly_export_saved_for_later
Simple script that exports a users "Saved For Later" list out of Feedly as a JSON string
// Simple script that exports a users "Saved For Later" list out of Feedly
// as a JSON string.
//
// This was intended for use in the Google Chrome's "Inspector" tool so your
// mileage may vary if used in other contexts.
//
// Format of JSON is as follows:
// [
// {
// title: "Title",
@sthembi
sthembi / dabblet.css
Created April 7, 2015 19:13
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@sthembi
sthembi / gist:9729600
Created March 23, 2014 20:49
Remove WooCommerce version generator
function my_woocommerce_loaded_function() {
global $woocommerce;
remove_action( 'wp_head', 'wc_generator_tag' );
}
add_action( 'woocommerce_init', 'my_woocommerce_loaded_function' );
@sthembi
sthembi / functions.php
Created February 28, 2014 11:26 — forked from claudiosanches/functions.php
woocommerce - remove tabs
<?php
/**
* Remove default product tabs.
*/
function cs_woocommerce_remove_default_tags( $tabs ) {
// Remove description tab.
if ( isset( $tabs['description'] ) ) {
unset( $tabs['description'] );
}