Skip to content

Instantly share code, notes, and snippets.

@ridinghoodmedia
ridinghoodmedia / Microsoft Office 2016 Mac not recognizing license keys
Created July 9, 2018 20:53
Fix for Microsoft Office 2016 Mac not recognizing license keys
MS office not recognizing keys:
https://answers.microsoft.com/en-us/msoffice/forum/all/office-2016-for-mac-unable-to-activate/5070ddce-cb74-4c7c-9acf-a5dc2a6d2d84?auth=1
1. go to ~/Library/Group Containers/
2. Delete all files starting with “UBF”
3. Restart computer
https://stackoverflow.com/questions/1125968/how-do-i-force-git-pull-to-overwrite-local-files
git fetch --all
Then, you have two options:
git reset --hard origin/master
OR If you are on some other branch:
git reset --hard origin/<branch_name>
@ridinghoodmedia
ridinghoodmedia / style.css
Created July 31, 2018 16:26
Default stylesheet
/* Prevent ios auto zooming select */
@media (max-width: 767px) {
select {
font-size: 16px;
}
select:focus {
font-size: 16px;
}
@ridinghoodmedia
ridinghoodmedia / gist:960ced6ff9136b3602c9c708f64f0d2f
Created August 9, 2018 17:03
ACF bidirectional relationship
class ConfigACF
{
public function __construct()
{
// Configure ACF plugin custom functionality
add_filter('acf/update_value/name=field_name', [$this, 'bidirectionalAcfUpdate'], 10, 3);
}
public function bidirectionalAcfUpdate($value, $post_id, $field)
{
@ridinghoodmedia
ridinghoodmedia / WpCustomPost.php
Last active August 10, 2018 20:27
Create custom post type
<?php
/**
* Participant class
*/
class Participant
{
public function __construct()
{
// Register post type with WP
@ridinghoodmedia
ridinghoodmedia / PodsRedirect.php
Last active January 29, 2019 00:05
Custom redirect after pods creates new post
<?php
/**
* Allows custom redirect using custom fields belonging to newly created post
* after a pods form submission
*/
class PodsRedirect {
public function __construct()
@ridinghoodmedia
ridinghoodmedia / babel-webpack.md
Created November 10, 2020 15:27 — forked from ncochard/babel-webpack.md
The correct way to compile ES6 using babel...

When you create a npm package, remember it might be used in a browser or a server, or even a command line utility… For each package you create, please pay attention at what it will be used for:

  1. Is it going to be used as a dependency to a nodejs application that is not bundled? (e.g. command line utilities)
  2. Is it going to be used as a dependency to a nodejs application that is bundled? (e.g. AWS Lambdas)
  3. Is it going to be used as a dependency to a browser application (always bundled)?.
  • In cases 2) and 3) you want to allow for tree shaking.
  • In cases 1) and 2) you want to benefit from the "ES6"/"ES next" features supported natively by nodejs.
  • In case 3) you also want to benefit from the native support of "ES6" from your browser.
@ridinghoodmedia
ridinghoodmedia / flywheel-local-xdebug-vscode.md
Created December 6, 2020 05:03 — forked from ahmadawais/flywheel-local-xdebug-vscode.md
Debug WordPress with Visual Studio Code | VSCode WordPress Debug Setup | WordPress xDebug Setup for Local by FlyWheel with VSCode | Part of the VSCode Learning Course → https://VSCode.pro

VSCode WordPress Debugging Setup: WordPress Xdebug Setup for Local by FlyWheel with VSCode


Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User

🚅 TL;DR

  • Make sure your Local by FlyWheel WordPress install is a custom install
@ridinghoodmedia
ridinghoodmedia / bem-css.md
Last active February 4, 2021 20:57
Ridinghood Media BEM CSS Guidelines
@ridinghoodmedia
ridinghoodmedia / sample.php
Last active March 2, 2021 23:19
Schema Planning
<?php
$properties = [
{property, 'name' => 'img'}
{property, 'name' => 'address'}
];
$properties = [
['img' => {property, 'name' => 'img'}],
['address' {property, 'name' => 'address'}]