Skip to content

Instantly share code, notes, and snippets.

Mitchel van Eijgen mvaneijgen

Block or report user

Report or block mvaneijgen

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
@mvaneijgen
mvaneijgen / order-by-acf-like-count.php
Created Aug 12, 2019 — forked from jasonbahl/order-by-acf-like-count.php
Shows how to add a custom order value to a connection to order by a custom field.
View order-by-acf-like-count.php
<?php // open PHP
add_filter( 'graphql_PostObjectsConnectionOrderbyEnum_values', function( $values ) {
$values['LIKE_COUNT'] = [
'value' => 'like_count',
'description' => __( 'The number of likes on the post', 'wp-graphql' ),
];
return $values;
@mvaneijgen
mvaneijgen / functions.php
Created Jun 26, 2019 — forked from rafsuntaskin/functions.php
Tribe events CSV Add extra export columns for WooCommerce customer address
View functions.php
<?php
/**
* Tribe, adding user meta to the attendees csv export
* Source: https://theeventscalendar.com/support/forums/topic/adding-woocommerce-order-notes-to-attendees-export/
*
*
**/
function tribe_export_custom_set_up( $event_id ) {
@mvaneijgen
mvaneijgen / events-conditional-wrappers.php
Created May 1, 2019 — forked from jo-snips/events-conditional-wrappers.php
The Events Calendar: Basic Conditional Wrappers
View events-conditional-wrappers.php
<?php
/*-----------------------------------------------------------------------------------*/
/* Conditional Logic to Detect Various Event Related Views/Pages
/*-----------------------------------------------------------------------------------*/
if( tribe_is_month() && !is_tax() ) { // Month View Page
echo 'were on the month view page';
} elseif( tribe_is_month() && is_tax() ) { // Month View Category Page
View ms-extract-umeta-clean.sql
-- delete any usermeta specific to the other subsites
delete from wp_usermeta where meta_key regexp '^wp_([0-9]+)_';
-- duplicate the wp_usermeta structure in a working data table,
-- but add a unique index for filtering out duplicates
create table _fix_usermeta like wp_usermeta;
alter table _fix_usermeta add unique(user_id, meta_key);
-- copy the site-specific usermeta, keeping only the last of each duplicate
insert into _fix_usermeta
@mvaneijgen
mvaneijgen / Contract Killer 3.md
Last active Aug 29, 2015 — forked from malarkey/Contract Killer 3.md
Dutch version (Nederlandse versie)
View Contract Killer 3.md

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 02/03/2015
  • Revised date: 02/03/2015
  • Original post

View Contract Killer 3.md

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

View Contract Killer 3.md

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

View colors
# Make ls use colors
export CLICOLOR=1
alias ls='ls -Fa'
# define colors
C_DEFAULT="\[\033[m\]"
C_WHITE="\[\033[1m\]"
C_BLACK="\[\033[30m\]"
C_RED="\[\033[31m\]"
C_GREEN="\[\033[32m\]"
You can’t perform that action at this time.