Skip to content

Instantly share code, notes, and snippets.

@ryanjbonnell
ryanjbonnell / facebook-like-box.html
Created May 30, 2014
Load the Facebook JavaScript SDK Asynchronously
View facebook-like-box.html
<div class="fb-like-box"
data-href="https://www.facebook.com/FacebookDevelopers"
data-colorscheme="light"
data-show-faces="true"
data-header="true"
data-stream="false"
data-show-border="true"
data-height="212">
</div>
@ryanjbonnell
ryanjbonnell / gist:b78002efbe6662703fa6
Created Jun 4, 2014
WordPress - MySQL Update Admin Email Address
View gist:b78002efbe6662703fa6
UPDATE
wp_options
SET
option_value = 'username@example.com'
WHERE
option_name = 'admin_email';
View mysql-reset-root-password.sh
$ sudo /usr/local/mysql/support-files/mysql.server stop
$ sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables --skip-networking &
mysql> UPDATE mysql.user SET Password=PASSWORD('') WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> exit
$ mysql -h localhost -u root
mysql> set password=password('');
mysql> exit
@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: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: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 / 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
@ryanjbonnell
ryanjbonnell / gist:6953571
Created Oct 12, 2013
Install Xcode 5.0 Command Line Tools for Mac OS X 10.9 "Mavericks"
View gist:6953571
$ xcode-select --install
@ryanjbonnell
ryanjbonnell / gist:6954813
Last active Dec 25, 2015
Determine MySQL Socket Locations and Permissions on Mac OS X
View gist:6954813
$ ls -al /tmp/mysql.sock; ls -al /var/mysql/mysql.sock
lrwxr-xr-x 1 root wheel 21 Oct 12 13:45 /tmp/mysql.sock -> /var/mysql/mysql.sock
srwxrwxrwx 1 _mysql wheel 0 Oct 12 13:51 /var/mysql/mysql.sock
ls: /tmp/mysql.sock: No such file or directory
srwxrwxrwx 1 _mysql wheel 0 Oct 12 13:51 /var/mysql/mysql.sock
You can’t perform that action at this time.