Skip to content

Instantly share code, notes, and snippets.

View petenelson's full-sized avatar

Pete Nelson petenelson

View GitHub Profile
@petenelson
petenelson / remove_unwanted_menu_and_toolbar_items_wordpress.php
Created July 30, 2012 19:58 — forked from BronsonQuick/remove_unwanted_menu_and_toolbar_items_wordpress.php
WordPress: Remove unwanted menu items from the Menu Bar and Toolbar
<?php
/* Remove unwanted menus in WordPress e.g. Posts, Comments and Links */
/* Inspired by http://wordpress.org/extend/plugins/white-label-cms/ */
function ctm_remove_admin_menus() {
global $menu, $submenu;
$exclude[0] = '';
array_push($exclude,__('Posts','default'));
array_push($exclude,__('Comments','default'));
array_push($exclude,__('Links','default'));
unset($exclude[0]);
@petenelson
petenelson / bacon.sh
Last active May 3, 2017 21:53
Get paragraphs of garbage content from baconipsum.com
#!/bin/bash
#####################
# bacon.sh
#
# Client to get paragraphs of garbage content from baconipsum.com
#
# usage:
# bacon.sh <paragraph-count>
#####################
@petenelson
petenelson / activate-memcached.sh
Created February 21, 2024 22:38 — forked from strategio/activate-memcached.sh
Setup memcached in a Local by Flywheel site
#!/usr/bin/env bash
PHP_VERSION=$1
CONF_FOLDER="/usr/local/etc/php/${PHP_VERSION}/"
PHP_INI="${CONF_FOLDER}php.ini"
cd ${CONF_FOLDER}
git clone --depth 1 https://github.com/php-memcached-dev/php-memcached.git
cd php-memcached
/usr/local/bin/phpize