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 / 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'] );
}
@sthembi
sthembi / woocommerce-remove-from-price.php
Created February 12, 2014 02:54 — forked from BFTrick/woocommerce-remove-from-price.php
plugin to remove price for variable products in woocommerce
<?php
/**
* Plugin Name: WooCommerce Remove Variation "From: $XX" Price
* Plugin URI: https://gist.github.com/BFTrick/7643587
* Description: Disable the WooCommerce variable product "From: $X" price.
* Author: Patrick Rauland
* Author URI: http://patrickrauland.com/
* Version: 1.0
*
* This program is free software: you can redistribute it and/or modify
@sthembi
sthembi / gist:8937786
Created February 11, 2014 16:02 — forked from kloon/gist:4228021
//Display Fields
add_action( 'woocommerce_product_after_variable_attributes', 'variable_fields', 10, 2 );
//JS to add fields for new variations
add_action( 'woocommerce_product_after_variable_attributes_js', 'variable_fields_js' );
//Save variation fields
add_action( 'woocommerce_process_product_meta_variable', 'variable_fields_process', 10, 1 );
function variable_fields( $loop, $variation_data ) {
?>
<tr>