Skip to content

Instantly share code, notes, and snippets.

From 1d13cebe32f27d6390b5c3f94a454b7c5d93b679 Mon Sep 17 00:00:00 2001
From: Tom Adams <tom@dxw.com>
Date: Tue, 27 Nov 2012 09:14:57 -0500
Subject: [PATCH] Make it work over HTTPS
---
storify.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/storify.php b/storify.php
From d81aefc658a569e3adc84d02e8ae8782bfdc455e Mon Sep 17 00:00:00 2001
From: Tom Adams <tom@dxw.com>
Date: Tue, 27 Nov 2012 10:19:34 -0500
Subject: [PATCH] HTTPS support
---
sharethis.php | 40 ++++++++++++++++++++--------------------
wp_st_opt.js | 12 ++++++------
2 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/sharethis.php b/sharethis.php
index 79f6859..116f296 100644
--- a/sharethis.php
+++ b/sharethis.php
@@ -58,7 +58,7 @@ function install_ShareThis(){
if($widget==false || !preg_match('/stLight.options/',$widget)){
$pkey2=get_option('st_pubid');
$widget ="<script charset=\"utf-8\" type=\"text/javascript\">var switchTo5x=true;</script>";
- $widget.="<script charset=\"utf-8\" type=\"text/javascript\" src=\"http://w.sharethis.com/button/buttons.js\"></script>";
+ $widget.="<script charset=\"utf-8\" type=\"text/javascript\" src=\"https://ws.sharethis.com/button/buttons.js\"></script>";
From d0c750611b10a017ffd3df55bc8c4dcb73dc1f89 Mon Sep 17 00:00:00 2001
From: Tom Adams <tom@dxw.com>
Date: Fri, 5 Oct 2012 10:45:24 -0400
Subject: [PATCH 1/3] Mixed content
---
wp-socializer.php | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/wp-socializer.php b/wp-socializer.php
From d0d0bf15033c2567062c8900e0e4ef13953f2e53 Mon Sep 17 00:00:00 2001
From: Tom Adams <tom@dxw.com>
Date: Fri, 12 Apr 2013 16:38:34 -0400
Subject: [PATCH] Change gettext usage
---
classes/class-s2-core.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/classes/class-s2-core.php b/classes/class-s2-core.php
From f549fafe7510e10c4201674e679aeed89bbef3cb Mon Sep 17 00:00:00 2001
From: Tom Adams <tom@dxw.com>
Date: Thu, 24 Jan 2013 16:39:19 -0500
Subject: [PATCH] [#919] IE compatible JS syntax
---
mailchimp.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mailchimp.php b/mailchimp.php
// IE img width/height polyfill
jQuery(function ($) {
$('img').each(function () {
var $this = $(this)
if ($this.attr('width') !== undefined) {
$this.css('width', $this.attr('width')+'px')
}
if ($this.attr('height') !== undefined) {
$this.css('height', $this.attr('height')+'px')
From 157cc551cbe2bbdbd836976fa43bb249e2608e30 Mon Sep 17 00:00:00 2001
From: Tom Adams <tom@dxw.com>
Date: Fri, 7 Jun 2013 09:01:33 -0400
Subject: [PATCH] s/$_POST/stripslashes_deep($_POST)/
---
by-email/by-email.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/by-email/by-email.php b/by-email/by-email.php
@mallorydxw
mallorydxw / xlsx2csv.rb
Created December 2, 2013 19:46
Apparently converting XLSX to CSV and keeping formulae intact is not something you can Google and find out how to do it? This is how you do it.
#!/usr/bin/env ruby
require 'rubygems'
require 'csv'
require 'roo'
excel = Roo::Excelx.new('filename.xlsx')
CSV do |csv| # (stdout)
@mallorydxw
mallorydxw / prepare-wxr.rb
Created April 14, 2014 14:40
The wordpress-importer plugin doesn't understand namespaces. Here's a workaround that converts XML generated by Go into XML this plugin understands.
#!/bin/ruby
# Read an XML document on STDIN, write an XML document on STDOUT
#
# Replace
# <wxr_version xmlns="http://wordpress.org/export/1.2/">1.2</wxr_version>
# with
# <wp:wxr_version>1.2</wp:wxr_version>
# and add xmlns:wp=... to the root node