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
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active May 4, 2024 15:47
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@mikaelz
mikaelz / delete-orphan.sql
Created August 16, 2017 13:59
Delete orphan postmeta and attachment in WordPress database
-- Delete orphan postmeta
DELETE pm
FROM wp_postmeta pm
LEFT JOIN wp_posts p ON pm.post_id = p.ID
WHERE p.ID IS NULL
;
-- Delete orphan attachment
DELETE p1
FROM wp_posts p1
@imath
imath / tickets.php
Last active October 9, 2023 03:47
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;
@dfontana
dfontana / CmderZSH.md
Last active March 12, 2023 21:45
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
public class Hello
{
   public static void Main()
   {
-      System.Console.WriteLine("Hello, World!");
+      System.Console.WriteLine("Rock all night long!");
   }
}
@robertpainsi
robertpainsi / README.md
Last active March 21, 2024 10:45
How to reopen a pull-request after a force-push?

How to reopen a pull-request after a force-push?

Precodinitions

  • You need the rights to reopen pull requests on the repository.
  • The pull request hasn't been merged, just closed.

Instructions

  1. Write down the current commit hash of your PR-branch git log --oneline -1 <PR-BRANCH>
  2. Write down the latest commit hash on github before the PR has been closed.
  3. git push -f origin :
@odan
odan / xampp_php7_xdebug.md
Last active April 17, 2024 05:36
Installing Xdebug for XAMPP
@chadrien
chadrien / README.md
Last active September 1, 2023 12:43
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 \
@scofennell
scofennell / DraggableSortableCheckboxesfortheWordPressCustomizer.php
Last active August 29, 2015 14:22
DraggableSortableCheckboxesfortheWordPressCustomizer.php
class LXB_AF_Checkbox extends WP_Customize_Control {
// I'm not sure where this gets used but it's in the codex.
public $type = 'checkbox_group';
/**
* This method must be named, exactly, 'render_content', as that's
* expected by the WP core cusotmization class, which it extends. It
* outputs the HTML for our custom input.
*