Skip to content

Instantly share code, notes, and snippets.

View JonathanReeve's full-sized avatar

Jonathan Reeve JonathanReeve

View GitHub Profile
@JonathanReeve
JonathanReeve / forums-search.php
Created April 10, 2014 21:35
Hack to Allow Buddypress Search Bar to Search BBPress Forums
// Adds BBPress "Forums" select option to Advanced Search. - JR
function mla_bp_search_form_type_select_add_forums($options) {
$options['bbpforums'] = __( 'Forums', 'buddypress' );
return $options;
}
add_filter('bp_search_form_type_select_options', 'mla_bp_search_form_type_select_add_forums');
// Fix forum search handling - JR
function mla_bp_core_action_search_site( $slug = '') {
@JonathanReeve
JonathanReeve / gist:b82a6c27493232bb0216
Last active August 29, 2015 14:07
Fix bp-groupblog links not working for public blogs of private groups
/**
* Override default BP Groupblog nav item functionality
*/
function my_custom_groupblog_setup_nav() {
// only add for groups
if ( !bp_is_group() ) return;
// only act if blog not embedded in group template
$checks = get_site_option('bp_groupblog_blog_defaults_options');
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JonathanReeve
JonathanReeve / issue-scraper
Created January 13, 2015 21:13
GitHub issue scraper to print issues from multiple repositories containing a label
#Not yet working!
# -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <codecell>
import requests
import json
@JonathanReeve
JonathanReeve / git-pull.php
Created February 22, 2015 16:12
Push to deploy with GitHub. This script performs a "git pull" on a webserver when it receives a webhook post signal from GitHub.
<?php
// When used in conjunction with GitHub web hooks, this script listens for
// a signal from GitHub. When GitHub tells us that the master or develop
// branches of our repo have been updated, we change into those directories
// and run `git pull`, which updates our code to the latest version.
function print_log( $log ) {
file_put_contents( 'logs/github.txt', print_r( $log, TRUE ), FILE_APPEND );
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JonathanReeve
JonathanReeve / gatsby-characters-PCA.ipynb
Last active November 5, 2016 19:01
Gatsby Characters PCA
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.