Skip to content

Instantly share code, notes, and snippets.

🏖
Santa Monica WordPress Developer

Austin Passy thefrosty

🏖
Santa Monica WordPress Developer
Block or report user

Report or block thefrosty

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View selective-restores-on-macos.md

Selective Restores on macOS

Note: This post is not yet finished

I have owned a Mac continuously for the last 8 years as part of my job and used it full time both professionally and personally. Over that time I have carried a lot of crap from machine to machine, and a lot of that was very work specific. Certs, credentials, applications, and other various configurations and files. I've always just performed a full Time Machine restore each time I upgraded.

I recently switched employers, and wanted to start mostly fresh, but with the ability to keep some of the more generic configurations on my Mac like VIM configurations, and the ability to bring over personal files. I wasn't sure how I was going to approach this at first. I imagined, that I would just take a Time Machine backup, perform a fresh install, and then use the Migration Assistant to uncheck some things I don't want.

Using the Time Machine backup and Migration Assistant, seemed like a great idea, although Migration Assistant doesn't give y

View wp-plugin-mu-loader.php
<?php
/**
* Plugin initialization file
*
* @package WP_Plugin_MU_Loader
* @since 1.0.0
*
* @wordpress-plugin
* Plugin Name: WP Plugin MU Loader
* Plugin URI: https://gist.github.com/felixarntz/daff4006112b60dfea677ca08fc0b31c
@jaredatch
jaredatch / mailhog-mamp.md
Created Jan 30, 2018
Install MailHog with MAMP Pro
View mailhog-mamp.md

Install MailHog with MAMP Pro, using HomeBrew.

MailHog

First let's make sure HB is updated. Open up terminal for the following steps.

$ brew update
@bradyvercher
bradyvercher / register-plugin-icons.php
Created Oct 4, 2017
Register icons to display on the Manage Plugins screen for plugins that aren't in the WordPress.org directory.
View register-plugin-icons.php
<?php
/**
* Register plugin icons.
*
* WordPress 4.9 introduced icons in the list table on the Manage Plugins
* screen. The icons are pulled from the W.org update API. If an icon isn't
* available, a generic plugin Dashicon is shown instead.
*
* @param array $value Plugin update data.
* @return array
@Majkl578
Majkl578 / Dockerfile
Last active Jan 8, 2019
Dockerized example for article at Pehapkari.cz about running multiple PHP versions: https://pehapkari.cz/blog/2017/03/27/multiple-php-versions-the-easy-way/
View Dockerfile
FROM debian:stretch
ENV DEBIAN_FRONTEND noninteractive
# install NGINX
RUN apt-get update && \
apt-get install -y nginx --no-install-recommends && \
rm -rf /var/lib/apt/lists/*
@JonnyWong16
JonnyWong16 / sync_playlists_to_users.py
Last active Sep 18, 2019
Sync Plex playlists to shared users.
View sync_playlists_to_users.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Sync Plex playlists to shared users.
# Author: /u/SwiftPanda16
# Requires: plexapi, requests, xmltodict
import requests
import xmltodict
@nmaggioni
nmaggioni / ufw_plex.md
Last active Aug 15, 2019 — forked from andrey-str/ufw plexmediaserver app profile.md
Plex Media Server UFW rule
View ufw_plex.md

/etc/ufw/applications.d/plexmediaserver

[plexmediaserver]
title=Plex Media Server (Standard)
description=The Plex Media Server
ports=32400/tcp|3005/tcp|5353/udp|8324/tcp|32410:32414/udp

[plexmediaserver-dlna]
title=Plex Media Server (DLNA)
description=The Plex Media Server (additional DLNA capability only)
@BretFisher
BretFisher / README.md
Last active Jan 25, 2019
Simple Apache + Nginx Reverse Proxy Example in Docker Compose
View README.md
  1. download these two files to the same directory
  2. docker-compose up
  3. http://localhost should show you "it works" which is apache being reverse-proxied through nginx
  4. docker sets up DNS for web based on compose service name so the nginx front-end can find http://web
  5. proxy is set to listen on public port 80 on host so it'll receive incoming traffic, then push to httpd
@Rarst
Rarst / RoboFile.php
Last active Apr 28, 2019
Robo command to build a release zip for Composer package.
View RoboFile.php
<?php
class RoboFile extends \Robo\Tasks {
/**
* Creates release zip
*
* @param string $package Composer package in vendor/name format.
* @param string $version Version to build.
*/
@soderlind
soderlind / dropzonejs-wp-rest-api.js
Last active Jun 18, 2018
DropzoneJS & WordPress REST API
View dropzonejs-wp-rest-api.js
/*
Uploading images is a two step process (from https://github.com/WP-API/WP-API/issues/1768#issuecomment-160540932):
POST the data to /wp/v2/media - this can either be as the request body, or in multipart format. This will upload the file, and give you a 201 Created response with a Location header. This header points to the post object for the attachment that has just been created.
PUT the post data to the endpoint returned in the Location header (which will look something like /wp/v2/media/{id}).
I do step 2 (PUT), if POST is a success, in myDropzone.on("success", function(file, response){}
*/
// dropzoneWordpressRestApiForm is the configuration for the element that has an id attribute
You can’t perform that action at this time.