Skip to content

Instantly share code, notes, and snippets.

@zamoose
zamoose / functions.php
Created March 3, 2012 03:23
Elbee Elgee child theme
<?php
remove_action( 'lblg_after_itemtext', 'lblg_post_info' );
@zamoose
zamoose / functions.php
Created March 12, 2012 15:38
BP reordering
<?php
/**
* This function rearranges BuddyPress navigation elements.
*/
function npat_alter_group_options(){
global $bp;
if(NPAT_DEBUG) echo '<pre>';
$slug = $bp->groups->current_group->slug;
$nav_array = $bp->bp_options_nav;
@zamoose
zamoose / functions.php
Created March 19, 2012 16:27
Hook output
<?php
function lbc_hook_check(){
global $wp_filter;
$tmp_filters = $wp_filter;
foreach( $tmp_filters as $key => $values ) {
if( preg_match( '/^lblg/', $key ) ) {
add_action($key, 'lbc_hook_echo');
@zamoose
zamoose / gist:4150576
Created November 26, 2012 20:59
LESS
/*
New and improved solution, available in a master LESS file for use anywhere.
*/
.setwidth(@width, @defaultw) when (isnumber(@width)){
width: @width;
}
.setwidth(@width, @defaultw) when not(isnumber(@width)){
width: @defaultw;
}
Started GET "/users/sign_in" for 72.92.42.152 at 2015-03-25 05:20:40 +0000
Processing by SessionsController#new as HTML
Completed 500 Internal Server Error in 93ms
NoMethodError (undefined method `push_events=' for #<GitlabIssueTrackerService:0x0000000490b358>):
app/models/project.rb:329:in `default_issue_tracker'
app/controllers/application_controller.rb:190:in `add_gon_variables'
@zamoose
zamoose / gist:5674441
Created May 29, 2013 22:47
Useful ssh shell expansion
complete -W "$(echo $(grep '^ssh ' .bash_history | sort -u | sed 's/^ssh //'))" ssh