Skip to content

Instantly share code, notes, and snippets.

View saas786's full-sized avatar
🏠
Working from home

saasfreelancer saas786

🏠
Working from home
View GitHub Profile
<?php
/*
Plugin Name: Delete All Subscriptions
Plugin URI:
Description: Delete all of those bad boys
Author:
Author URI:
Version: 1.0
*/
function mystic_delete_all_subscriptions() {
@saas786
saas786 / behat-test.feature
Created April 2, 2021 16:14 — forked from dinarcon/behat-test.feature
WordPress BDD testing with Behat and WordHat
Feature: Visibility of the homepage
In order to have confidence that my site is accessible
As a site administrator
I want to verify I can visit the homepage
Scenario: Verify the homepage
Given I am on the homepage
Then the response status code should be 200
@saas786
saas786 / README.md
Created March 27, 2021 07:28 — forked from chadrien/README.md
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
&amp;&amp; echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" &gt; /usr/local/etc/php/conf.d/xdebug.ini \
@saas786
saas786 / xampp_php7_xdebug.md
Created March 27, 2021 07:28 — forked from odan/xampp_php7_xdebug.md
Installing Xdebug for XAMPP
@saas786
saas786 / async-defer-module.md
Created March 10, 2021 11:01 — forked from jakub-g/async-defer-module.md
async scripts, defer scripts, module scripts: explainer, comparison, and gotchas

<script> async, defer, async defer, module, nomodule, src, inline - the cheat sheet

With the addition of ES modules, there's now no fewer than 24 ways to load your JS code: (inline|not inline) x (defer|no defer) x (async|no async) x (type=text/javascript | type=module | nomodule) -- and each of them is subtly different.

This document is a comparison of various ways the <script> tags in HTML are processed depending on the attributes set.

If you ever wondered when to use inline <script async type="module"> and when <script nomodule defer src="...">, you're in the good place!

Note that this article is about <script>s inserted in the HTML; the behavior of <script>s inserted at runtime is slightly different - see Deep dive into the murky waters of script loading by Jake Archibald (2013)

@saas786
saas786 / CmderZSH.md
Created November 25, 2020 12:09 — forked from dfontana/CmderZSH.md
My setup guide for installing Cgywin, Mintty, Cmder, and ZSH.

What's this?

Instructions to obtain ZSH on a windows environment, without the input funny business presented by some other attempted solutions.

The final result is ZSH running on a mintty terminal, emulated by cygwin, and being handled by the popular cmder.

Why is this here?

For the benefit of myself and others. I've already followed these instructions twice. It took me hours to figure all this out, maybe someone else can save a few.

What exactly is covered?

  • Installing and setting up cmder
module.exports = {
entry: {
main: path.resolve(__dirname, 'src/index.js'),
ProductList: path.resolve(__dirname, 'src/ProductList/ProductList.js'),
ProductPage: path.resolve(__dirname, 'src/ProductPage/ProductPage.js'),
Icon: path.resolve(__dirname, 'src/Icon/Icon.js'),
},
output: {
path: path.resolve(__dirname, 'dist'),
@saas786
saas786 / tickets.php
Created June 5, 2020 12:57 — forked from imath/tickets.php
Using WP Statuses for custom Post Types.
<?php
/**
* Using WP Statuses for custom Post Types.
*
* @link http://github.com/imath/wp-statuses
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
@saas786
saas786 / xcarchive2ipa
Created April 24, 2020 10:59 — forked from raghavgarg1257/xcarchive2ipa
To convert .xcarchive to .ipa | xcode 9
xcodebuild
-exportArchive
-exportOptionsPlist {PATH_TO_PROJECT_ROOT}/ios/build/info.plist
-archivePath {PATH_TO_ARCHIVE_MADE_USING_XCODE}/MyApp.xcarchive
-exportPath {PATH_TO_EXPORT_THE_APP}/MyApp.ipa