Skip to content

Instantly share code, notes, and snippets.

View rob-mosher's full-sized avatar

Rob Mosher rob-mosher

View GitHub Profile
<?php
/*
Description: Adds a taxonomy filter in the admin list page for a custom post type.
Written for: http://wordpress.stackexchange.com/posts/582/
By: Mike Schinkel - http://mikeschinkel.com/custom-workpress-plugins
Instructions: Put this code in your theme's functions.php file or inside your own plugin. Edit to suite your post types and taxonomies. Hope this helps...
*/
add_filter('manage_listing_posts_columns', 'add_businesses_column_to_listing_list');
function add_businesses_column_to_listing_list( $posts_columns ) {
if (!isset($posts_columns['author'])) {
@dvessel
dvessel / README.mdown
Last active December 10, 2024 11:34
Sass+Compass, Guard, LiveReload

This will enable Sass+Compass with LiveReload through Guard. (Guard screen cast)

You will also need a browser component to communicate with LiveReload. (browser extension, livereload.js)

If you prefer going through a GUI, that option is available. The following instructions is specific to Mac OS X and it works through the command line.

Note that this is not specific to Rails projects. This can work for any standalone front-end project.

Instructions

@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 20, 2025 07:18
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@gyrus
gyrus / gist:3155982
Created July 21, 2012 14:40
Rename WordPress "Posts" to "News"
<?php
/**
* Rename "Posts" to "News"
*
* @link http://new2wp.com/snippet/change-wordpress-posts-post-type-news/
*/
add_action( 'admin_menu', 'pilau_change_post_menu_label' );
add_action( 'init', 'pilau_change_post_object_label' );
function pilau_change_post_menu_label() {
@derchrisuk
derchrisuk / gist:3165794
Created July 23, 2012 19:52
Overviewer build on RaspberryPi
# python setup.py build
running build
running build_py
copying overviewer_core/overviewer_version.py -> build/lib.linux-armv6l-2.6/overviewer_core
running build_ext
building 'overviewer_core.c_overviewer' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I. -I/usr/lib/pymodules/python2.6/numpy/core/include -I/usr/include/python2.6 -c overviewer_core/src/main.c -o build/temp.linux-armv6l-2.6/overviewer_core/src/main.o -Wno-unused-variable -Wno-unused-function -Wdeclaration-after-statement -Werror=declaration-after-statement
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I. -I/usr/lib/pymodules/python2.6/numpy/core/include -I/usr/include/python2.6 -c overviewer_core/src/composite.c -o build/temp.linux-armv6l-2.6/overviewer_core/src/composite.o -Wno-unused-variable -Wno-unused-function -Wdeclaration-after-statement -Werror=declaration-after-statement
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstr
@miguelbaldi
miguelbaldi / install-oracle-jdk.sh
Last active December 25, 2015 20:39
Bash script for installing Oracle JDK|JRE as a Debian Package and optionally configuring java plugin for Mozilla browser. Just follow the instructions: ./install-oracle-jdk.sh Needs sudo installed and configured. Tested on Debian Jessie (testing)
#!/bin/bash
# ---------------------------------------------------------------------------
# install-oracle-jdk.sh - Oracle Java JDK/JRE Debian installer
# Copyright 2013, Miguel A. Baldi Horlle ([email protected])
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@zlalanne
zlalanne / tmux_cygwin.md
Last active February 3, 2023 23:33
tmux on Cygwin

Steps to install tmux in Cygwin

Install required Cygwin packages

  1. run Cygwin setup.exe
  2. install these packages that are not installed by default: automake, gcc, git and pkg-config

Install libevent

  1. browse http://libevent.org
  2. download libevent-2.0.21-stable.tar.gz
@okv
okv / gist:2b0d9b6c1c73c036cabc
Created July 22, 2014 10:29
Icinga2: Configuration Syntax Highlighting using Vim
PREFIX=~/.vim && mkdir -p $PREFIX/{syntax,ftdetect} && curl https://raw.githubusercontent.com/Icinga/icinga2/ec75e7dcbbf8c5650197a82107969936220707c8/tools/syntax/vim/syntax/icinga2.vim > $PREFIX/syntax/icinga2.vim && curl https://raw.githubusercontent.com/Icinga/icinga2/ec75e7dcbbf8c5650197a82107969936220707c8/tools/syntax/vim/ftdetect/icinga2.vim > $PREFIX/ftdetect/icinga2.vim
@rothgar
rothgar / install-tmux
Last active August 19, 2024 07:37 — forked from ekiara/how_to_install_tmux_on_centos
Install tmux 1.9 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local