Skip to content

Instantly share code, notes, and snippets.

@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active January 31, 2024 14:45
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@stephanieleary
stephanieleary / functions.php
Last active March 14, 2023 22:50
Specify meta boxes that should be hidden by default for new users.
<?php
add_filter( 'default_hidden_meta_boxes', 'custom_default_hidden_screen_options', 10, 2 );
function custom_default_hidden_screen_options( $hidden, $screen ) {
$hide_these = array(
'dashboard_primary',
'postcustom',
'trackbacksdiv',
@noahub
noahub / menu_box.css
Last active July 3, 2017 21:30
Mobile Hamburger Menu
<style>
/* Replace "#lp-pom-box-113" with the ID of your menu box and the 'top' value with the pixel height of your navigation bar */
#lp-pom-box-113{
display: none;
position: fixed;
top: 96px;
left: 50%;
margin-left: -160px;
z-index:9999;
}
@tomazzaman
tomazzaman / codeable.io.conf
Created February 26, 2015 21:38
Codeable.io Nginx config
server {
include /home/webmaster/www/codeable.io.conf;
server_name codeable.io;
listen 443 ssl spdy default_server;
root /home/webmaster/www/codeable.io;
index index.php index.html;
error_log /var/log/nginx/codeable.io.error.log warn;
@richardW8k
richardW8k / rw-gf-total-field-logic.php
Last active November 10, 2017 03:18
Enables use of the total field with conditional logic. [hide] this field if [total][less than][0.1] or [show] this field if [total][greater than][0]. Because the total field is always the last field to be saved you can't use it when configuring conditional logic on other fields. Displaying other fields based on the total would prevent those fiel…
<?php
class RW_GF_Total_Field_Logic {
public function __construct() {
add_action( 'init', array( $this, 'init' ) );
}
function init() {
if ( ! property_exists( 'GFForms', 'version' ) || ! version_compare( GFForms::$version, '1.9', '>=' ) ) {
return;
<?php
/**
* vpm_default_hidden_meta_boxes
*/
function vpm_default_hidden_meta_boxes( $hidden, $screen ) {
// Grab the current post type
$post_type = $screen->post_type;
// If we're on a 'post'...
@mutewinter
mutewinter / Alfred 3 Workflows.md
Last active November 25, 2020 14:14
A list of Alfred 3 workflows I'm using.
# Block Adobe Activation
127.0.0.1 hl2rcv.adobe.com
127.0.0.1 t3dns.adobe.com
127.0.0.1 3dns-1.adobe.com
127.0.0.1 3dns-2.adobe.com
127.0.0.1 3dns-3.adobe.com
127.0.0.1 3dns-4.adobe.com
127.0.0.1 activate.adobe.com
127.0.0.1 activate-sea.adobe.com
127.0.0.1 activate-sjc0.adobe.com
<?php
if ( ! function_exists( 'wp_new_user_notification' ) ) :
function wp_new_user_notification( $user_id, $plaintext_pass = '' ) {
// Return early if no password is set.
if ( empty( $plaintext_pass ) ) {
return;
}
$user = get_userdata( $user_id );