Skip to content

Instantly share code, notes, and snippets.

View mizner's full-sized avatar

Michael Mizner mizner

View GitHub Profile
Use these in the GV search field. You will likely need to refresh/select all after each as you can only do ten messages at a time.
* Mark all SMS/Text Messages as Read
label:sms is:unread
* Mark all voicemails as Read
label:voicemail is:unread
@mizner
mizner / osx_setup.md
Created January 14, 2018 18:34 — forked from millermedeiros/osx_setup.md
Mac OS X setup.

Setup Mac OS X Mountain Lion or Mavericks

Edit: I few months ago I got a new laptop and did the same thing on Mavericks.

I just replaced the hard drive of my mbp and decided to do a clean install of Mountain Lion (10.8.5) since I was still using Snow Leopard (10.6.8).

I kinda regret for not using Boxen to automate the

@mizner
mizner / functions.php
Created October 30, 2017 06:04 — forked from tripflex/functions.php
WordPress Remove Filter (remove_filter converted to remove_class_filter) to remove Filter/Action without Class Object access. Works with WordPress 1.2+ (4.7+ support added 9-19-2016)
<?php
/**
* Make sure the function does not exist before defining it
*/
if( ! function_exists( 'remove_class_filter' ) ){
/**
* Remove Class Filter Without Access to Class Object
*
* In order to use the core WordPress remove_filter() on a filter added with the callback
@mizner
mizner / svg-functions.php
Created October 20, 2017 02:25 — forked from kingkool68/svg-functions.php
SVG helper functions for WordPress
<?php
// Throw this in your theme and include it in your functions.php file
/**
* Helper function for fetching SVG icons
*
* @param string $icon Name of the SVG file in the icons directory
* @return string Inline SVG markup
*/
function wp_svg_icon( $icon = '' ) {
@mizner
mizner / webpack.php
Created September 4, 2016 09:59 — forked from raphaelkross/webpack.php
Enqueue our dynamic webpack code
if(false == IVAN_OFFSET_DEBUG) {
// Register main theme styles and enqueue it.
// Hint: you can unregister it and replace by your own compiled version in a child theme.
wp_enqueue_style( 'ivan-theme-styles', get_template_directory_uri() . '/css/theme-styles'.$prefix.'.css', array(), '1' );
} else {
wp_enqueue_script( 'webpack-dev-server', 'http://localhost:3002/webpack-dev-server.js', array(), null, false );
wp_enqueue_script( 'webpack-bundle', 'http://localhost:3002/hmr/bundle.js', array(), null, false );
}
@mizner
mizner / docker_composeV2_static.yml
Last active August 24, 2016 15:14 — forked from RafPe/docker_composeV2_static.yml
Docker compose V2 static addressing (example?)
services:
haproxy:
image: haproxy:latest
ports:
- "80:80"
- "443:443"
volumes:
- ${PWD}/haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
restart: always
networks:
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@mizner
mizner / docker-wordpress.sh
Created August 16, 2016 10:03 — forked from tatemz/docker-wordpress.sh
A quick way to get a WordPress installation up and running with Docker
#!/bin/bash
mkdir wordpress-site && cd wordpress-site
touch docker-compose.yml
cat > docker-compose.yml <<EOL
my-wpdb:
image: mariadb
ports:
@mizner
mizner / iterm.scpt
Created August 12, 2016 03:51 — forked from gnachman/iterm.scpt
Fix docker quickstart terminal for iTerm2 version 2.9 and later
on write_to_file(this_data, target_file, append_data)
try
set the target_file to the target_file as string
set the open_target_file to open for access file target_file with write permission
if append_data is false then set eof of the open_target_file to 0
write this_data to the open_target_file starting at eof
close access the open_target_file
return true
on error
try
@mizner
mizner / WP-CLI-Commands
Created July 22, 2016 09:02 — forked from lukecav/WP-CLI-Commands
WP-CLI - Handy Commands
Search and Replace
https://wp-cli.org/commands/search-replace/
wp search-replace
wp search-replace 'http://example.dev' 'http://example.com'
Optmize database
https://wp-cli.org/commands/db/optimize/
Repair database
http://wp-cli.org/commands/db/repair/