Skip to content

Instantly share code, notes, and snippets.

View rickbenetti's full-sized avatar

Rick Benetti rickbenetti

View GitHub Profile
@rickbenetti
rickbenetti / README.md
Created October 20, 2018 00:12 — forked from remcotolsma/README.md
WordPress development environment on Mac with Brew, Nginx, PHP 7, PHP-FPM, MariaDB, phpMyAdmin and more

WordPress development environment on Mac with Brew, Nginx, PHP 7, PHP-FPM, MariaDB, phpMyAdmin and more

Brew

http://brew.sh/

brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
@rickbenetti
rickbenetti / nginx.conf
Created September 6, 2018 17:33 — forked from nrollr/nginx.conf
NGINX config for SSL with Let's Encrypt certs
# Advanced config for NGINX
server_tokens off;
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options nosniff;
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
@rickbenetti
rickbenetti / functions.php
Created December 14, 2016 02:00 — forked from joecue/functions.php
Reset WordPress User Role Capabilities
if ( !function_exists( 'populate_roles' ) ) {
require_once( ABSPATH . 'wp-admin/includes/schema.php' );
}
populate_roles();
@rickbenetti
rickbenetti / WORDPRESS: change Posts label in admin area
Last active April 5, 2016 12:42 — forked from raaar/WORDPRESS: change Posts label in admin area
WORDPRESS: change Posts label in admin area
function change_post_label() {
global $menu;
global $submenu;
$menu[5][0] = 'Blog';
$submenu['edit.php'][5][0] = 'Blog';
$submenu['edit.php'][10][0] = 'Adicionar publicação';
$submenu['edit.php'][16][0] = 'Blog Tags';
echo '';
@rickbenetti
rickbenetti / osx-10.10-setup.md
Last active March 16, 2016 13:16 — forked from kevinelliott/osx-10.10-setup.md
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@rickbenetti
rickbenetti / gist:0ad45b9e7961b2064a83
Created October 6, 2015 22:14 — forked from taylorotwell/gist:db67dd369b00022850b4
Mac Yosemite Dev Machine Setup

XCode

  • Install XCode from App Store.
  • Open XCode and agree to terms and conditions.

XCode CLI Tools

  • xcode-select --install

Install Homebrew

@rickbenetti
rickbenetti / price.phtml
Last active September 18, 2015 03:33 — forked from jasontipton/price.phtml
Adding 'hreview-aggregate' Microformat - Magento 1.9 Community Edition
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
# Encrypt the repository
# Remove/modify this line if the repository is meant to be open-source
*.* filter=git-crypt diff=git-crypt
.gitattributes !filter !diff
# These files are text and should be normalized (Convert crlf => lf)
*.php text
*.phtml text
*.css text
*.js text
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php