Skip to content

Instantly share code, notes, and snippets.

@ryanjbonnell
ryanjbonnell / facebox.html
Created Jan 18, 2012
Open jQuery Datepicker in Facebox
View facebox.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/base/jquery-ui.css" type="text/css" media="all" />
<link rel="stylesheet" href="css/facebox.css" type="text/css" media="all" />
</head>
@ryanjbonnell
ryanjbonnell / gist:1926630
Created Feb 27, 2012
jQuery Vegas Plugin output for WordPress
View gist:1926630
<?php if(get_field('slideshow')): ?>
<script src="<?php bloginfo('template_directory') ?>/js/jquery.vegas-1.2.min.js"></script>
<script>
jQuery(document).ready(function ($) {
$.vegas('slideshow', {
step: 0,
delay: 5000,
backgrounds: [
<?php
@ryanjbonnell
ryanjbonnell / gist:3880048
Last active Jul 9, 2020
Install Memcache on Mac OS X 10.8 "Mountain Lion"
View gist:3880048
# memcached requires libevent
cd /usr/local/src
curl -L -O http://cloud.github.com/downloads/libevent/libevent/libevent-2.0.17-stable.tar.gz
tar -xvzf libevent-2.0.17-stable.tar.gz
cd libevent-2.0.17-stable*
./configure
make
sudo make install
# Compile memcached utility
@ryanjbonnell
ryanjbonnell / gist:4074061
Last active Mar 8, 2020
Install PHP APC on Mac OS X 10.8 "Mountain Lion"
View gist:4074061
# Compile PCRE - Perl Compatible Regular Expressions
cd /usr/local/src
curl -O ftp://ftp.csx.cam.ac.uk//pub/software/programming/pcre/pcre-8.31.tar.gz
tar -xvzf pcre-8.31.tar.gz
cd pcre-8.31
./configure
make
sudo make install
# Compile Autoconf
@ryanjbonnell
ryanjbonnell / gist:4165602
Created Nov 28, 2012
Install wget on Mac OS X 10.8 "Mountain Lion"
View gist:4165602
cd /usr/local/src
curl -O http://ftp.gnu.org/gnu/wget/wget-1.14.tar.gz
tar -xzvf wget-1.14.tar.gz
cd wget-1.14
./configure --with-ssl=openssl
make
sudo make install
@ryanjbonnell
ryanjbonnell / gist:4611642
Last active Nov 21, 2018
Install lynx on Mac OS X 10.8 "Mountain Lion"
View gist:4611642
cd /usr/local/src
curl -O http://lynx.isc.org/lynx2.8.7/lynx2.8.7.tar.gz
tar -xzvf lynx2.8.7.tar.gz
cd lynx2-8-7
./configure --mandir=/usr/share/man
make
sudo make install
@ryanjbonnell
ryanjbonnell / gist:5306629
Last active Dec 15, 2015
Install PHP Mcrypt on Mac OS X 10.8 "Mountain Lion"
View gist:5306629
# Download PHP 5.3.15 Source
cd /usr/local/src
curl -L -O http://us.php.net/get/php-5.3.15.tar.gz/from/us1.php.net/mirror
tar -xzvf php-5.3.15.tar.gz
# Download libmcrypt
cd /usr/local/src
curl -O http://iweb.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
tar -xzvf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
@ryanjbonnell
ryanjbonnell / gist:5348039
Last active Dec 16, 2015
Install PEAR on Mac OS X 10.9 "Mavericks"
View gist:5348039
sudo php /usr/lib/php/install-pear-nozlib.phar
pear config-set php_ini /private/etc/php.ini
pecl config-set php_ini /private/etc/php.ini
sudo pear upgrade-all
sudo pecl install apc
sudo pecl install xdebug
# Install ApiGen
sudo pear install pear.apigen.org/apigen
@ryanjbonnell
ryanjbonnell / wordpress-page-generation-stats.php
Last active May 14, 2017
Display WordPress Page Generation Stats for Performance Profiling
View wordpress-page-generation-stats.php
<?php
/**
* Display MySQL Query Count and Page Generation Time for Performance Profiling
* ------------------------------------------------------------------------------
*/
if ( ! function_exists( 'show_page_generation_stats' ) ) {
function show_page_generation_stats() {
if ( WP_DEBUG === true && current_user_can('administrator') ) {
global $wpdb;
@ryanjbonnell
ryanjbonnell / gist:6585822
Created Sep 16, 2013
Install MySQL Tuner on Mac OS X 10.8 "Mountain Lion"
View gist:6585822
cd /usr/local/bin
sudo curl -Ol https://raw.github.com/major/MySQLTuner-perl/master/mysqltuner.pl
sudo chmod 755 mysqltuner.pl
You can’t perform that action at this time.