Skip to content

Instantly share code, notes, and snippets.

View kidunot89's full-sized avatar
🎧
In the zone

Geoff Taylor kidunot89

🎧
In the zone
View GitHub Profile
@ranaaterning
ranaaterning / args.php
Created August 22, 2019 14:47
Implementation of a filter query containing AND and OR statement
<?php
use WPGraphQL\Type\WPInputObjectType;
use WPGraphQL\Types;
include_once('types.php');
add_filter( 'graphql_input_fields', function ( $fields, $type_name, $config ) {
if ( $type_name === 'RootQueryToProductConnectionWhereArgs' ) {
@technoglot
technoglot / project-proposal-template.md
Last active April 3, 2020 02:47
Project proposal template that you can use to write a concise project proposal and keep your ideas documented and organised.

Project Proposal Template/Boilerplate

Project Name/Title

Name of the project.

Date 

Date and time of creation.

Last Updated On

Date and time when the document was last updated.

@jasonbahl
jasonbahl / audio-connection.php
Created January 25, 2019 18:46
Showcases how to register custom connections with WPGraphQL. See:
add_action( 'init', function() {
register_post_type( 'audio-track', [
'public' => true,
'label' => __( 'Audio Tracks', 'wp-graphql' ),
'show_in_graphql' => true,
'graphql_single_name' => 'AudioTrack',
'graphql_plural_name' => 'AudioTracks'
] );
register_post_type( 'audio-playlist', [
@jpbeltrami
jpbeltrami / git_tags.MD
Last active August 30, 2020 23:44
GIt tags cheatsheet

list tags

git tag

create tag

git tag tagname

delete remote tag

@lightonphiri
lightonphiri / bash-install_google_fonts_on_ubuntu.md
Last active April 26, 2025 06:21
Install Google Fonts on Ubuntu

Install Google Fonts

Download desired fonts

https://fonts.google.com/?selection.family=Open+Sans

Install Google Fonts on Ubuntu

cd /usr/share/fonts
sudo mkdir googlefonts
cd googlefonts
sudo unzip -d . ~/Downloads/Open_Sans.zip

@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active August 16, 2024 13:39
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@stormwild
stormwild / woocommerce-create-order.md
Last active October 28, 2024 06:17
WooCommerce Creating Order Programmatically

WooCommerce Creating Order Programmatically

WooCommerce Create Order

creating Woocommerce order with line_item programatically

// http://stackoverflow.com/questions/26581467/creating-woocommerce-order-with-line-item-programatically
$address = array(
            'first_name' => 'Fresher',
@gunjanpatel
gunjanpatel / revert-a-commit.md
Last active April 27, 2025 09:56
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

@renventura
renventura / invoice-cpt.php
Last active January 16, 2020 19:46
Registers an "Invoice" custom post type
<?php //* Mind this opening PHP tag
/**
* Register Invoice Type
*
* @author Ren Ventura
* @link http://www.engagewp.com/create-invoices-gravty-forms-wordpress
*/
add_action( 'init', 'rv_invoice_cpt' );
@bekarice
bekarice / edit-woocommerce-checkout-template.php
Last active October 28, 2024 06:16
Add content and notices to the WooCommerce checkout - sample code
/**
* Each of these samples can be used - note that you should pick one rather than add them all.
*
* How to use WC notices: https://github.com/woothemes/woocommerce/blob/master/includes/wc-notice-functions.php#L96
* Tutorial: http://www.skyverge.com/blog/edit-woocommerce-templates/
**/
/**
* Add a content block after all notices, such as the login and coupon notices.
*