Skip to content

Instantly share code, notes, and snippets.

View iaincoughtrie's full-sized avatar

Iain Coughtrie iaincoughtrie

View GitHub Profile
@Nezteb
Nezteb / elixir-language-server-comparison.md
Last active September 9, 2025 16:14
Elixir Language Server Comparisons

Update 2

As of August 28th, 2025, Expert LSP has been released: https://github.com/elixir-lang/expert

Although still a work in progress, the plan is for the other three LS implementations to be archived. I may try to come up with a new way to track Expert's featureset, but I would probably contribute that back to Expert as documentation.

Update

As of August 15, 2024, it's been announced that the three projects bein compared here will soon merge! See the official Elixir blog post for more details: https://elixir-lang.org/blog/2024/08/15/welcome-elixir-language-server-team/

@cartpauj
cartpauj / memberpress-hooks.php
Last active October 8, 2025 12:40
Various Subscription and Transaction status hooks for MemberPress with some helpful comments
<?php
//Capture a new member signup. Only ever triggers once for each new member.
//Does not trigger for exising members who have subscribed to a Membership before.
//
//The user may not be logged in when this is called
//as it is triggered when a user is added over the REST API,
//and also when a user is added from the dashboard (MemberPress -> Members -> Add New)
function mepr_capture_new_member_signup_completed($event) {
$user = $event->get_data();
$txn_data = json_decode($event->args);
@damiencarbery
damiencarbery / cmb2-repeater-demo-display-data.php
Last active July 9, 2024 10:42
CMB2 Repeater Demo - a simple example
<?php
add_filter( 'the_content', 'crd_append_post_links' );
function crd_append_post_links( $content ) {
if ( is_page() ) {
$post_links_data = get_post_meta( get_the_ID() );
if ( isset( $post_links_data[ 'blog_group' ][ 0 ] ) ) {
$blog_list = maybe_unserialize( $post_links_data[ 'blog_group' ][ 0 ] );
$posts_list = '<ul>';
foreach ( $blog_list as $post_info ) {
@sheabunge
sheabunge / autoload.php
Last active October 9, 2024 00:31
Basic PHP class autoloader that follows the WordPress coding standards for class names and class filenames
<?php
namespace Shea\Example_Plugin;
/**
* Enable autoloading of plugin classes in namespace.
*
* @param $class_name
*/
function autoload( $class_name ) {