Skip to content

Instantly share code, notes, and snippets.

View jwenerd's full-sized avatar
workin'

Jared Wenerd jwenerd

workin'
View GitHub Profile
Array
(
[0] => Array
(
[function] => {closure}
[args] => Array
(
[0] => https://sites.psu.edu/wp-admin/admin.php?page=jetpack
)
<% if ENV['TEXAS_STATE'] %>
// Texas state CSS over rides go here
<% end %>
{
"method": "GET",
"path": "\/steps\/72\/earn",
"format": "html",
"controller": "steps",
"action": "earn",
"status": 200,
"duration": 310.31,
"view": 293.87,
"db": 4.94,
@jwenerd
jwenerd / gist:87a10a7ae74e4931ac96
Created April 22, 2015 15:22
Co Authores Plus WP plugin - set template tags auto
<?php
add_filter('coauthors_auto_apply_template_tags', '__return_true');
@jwenerd
jwenerd / wp-multisite-db-upgrade.php
Last active August 29, 2015 14:20
with changes for our 4.2.2 mb upgrade
<?php
/**
* WordPress Multisite upgrade script
*
*
* @author Mo Jangda batmoo@gmail.com,
* Jared Wenerd wenerd87@gmail.com
* @license GPL2
*/
Array
(
[1441915864] => Array
(
[jetpack_clean_nonces] => Array
(
[40cd750bba9870f18aada2478b24840a] => Array
(
[schedule] => hourly
[args] => Array
<?php
/* The new responsive image feature in wordpress 4.4 causes image sourceset attribuet
to insert images as HTTP rather than HTTPS. This completely breaks images on sites where
the site is loaded ( and in sometimes force-loaded) to be served via HTTPS
The following plugin changes these images to be HTTPS if the site is served via HTTPS
*/
if ( is_ssl() ) {
add_filter('wp_calculate_image_srcset', 'psu_https_srcset_fix' , 100 , 5);
}
function psu_https_srcset_fix( $sources, $size_array, $image_src, $image_meta, $attachment_id ){
This file has been truncated, but you can view the full file.
A Beautiful Life
Each day I'll do a golden deed
By helping those who are in need
My life on earth is but a span
And so I'll do the best I can
   Life's evening sun is sinking low
   A few more days and I must go
@jwenerd
jwenerd / instructions.md
Last active July 11, 2017 15:33
DB copy instructions for Christine

The following outlines how to access the badges production server and copy the production database to your local machine to use for development.

ssh to server:

ssh -p 1855 badgesapp.vmhost.psu.edu

The badges application code and db is run with the user badgesapp. Start a shell session using this account with:

--------------------------------------------------------------------------------------------------------
# FROM Global Search
SELECT Count(*)
FROM "pg_search_documents"
INNER JOIN
(
SELECT "pg_search_documents"."id" AS pg_search_id,
(Ts_rank((To_tsvector('simple', COALESCE("pg_search_documents"."content"::text, ''))), (To_tsquery('simple', ''' '
|| 'len'