Skip to content

Instantly share code, notes, and snippets.

View cmcintosh's full-sized avatar
💭
Looking For Projects

Chris McIntosh cmcintosh

💭
Looking For Projects
View GitHub Profile
@cmcintosh
cmcintosh / composer.json
Created January 19, 2021 12:50 — forked from mpociot/composer.json
Simple ReactPHP chat server - connect to it: nc laracon.beyondco.de 8000
{
"require": {
"react/event-loop": "^1.1",
"react/stream": "^1.1",
"react/promise": "^2.8",
"react/socket": "^1.6",
"react/http": "^1.2",
"nubs/random-name-generator": "^2.2"
}
}
@cmcintosh
cmcintosh / starbase.deltaui
Created September 5, 2021 10:59 — forked from johnpenny/starbase.deltaui
starbase.deltaui
PROJECT: DELTA UI
BY: Oo
COMPANY: io
V: 1.1
LIC: FREE if you leave in the credit
$: Any IN-GAME donations are welcome
---------------------------------------------------------------------------
#### HOW TO INSTALL
// Available on the Unity Asset Store https://www.assetstore.unity.com/publishers/49504
// Copyright © 2020 Shamil Bikmullin
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CityGenerator : MonoBehaviour
{
@cmcintosh
cmcintosh / gist:0093bc282084f79f7883a53f66507584
Created April 17, 2023 08:25
Example Code for hiding products for Commerce Stock.
<?php
/**
* @file mymodule.module
* Includes drupal hooks for module.
*/
use Drupal\mymodule\PremiumContentAccessControlHandler;
/**
* Implements hook_entity_type_alter().
*/
function mymodule_entity_type_alter(array &$entity_types) {
To embed a React component inside a Drupal 8 page template, you first need to create a React component and bundle it into a JavaScript file. Then, you can include the JavaScript file in your Drupal theme or module and use it in your page template.
Here’s an example of how to embed a React component inside a Drupal 8 page template:
1. Create a new React component called MyComponent in a JavaScript file, e.g. mycomponent.jsx:
import React from 'react';
class MyComponent extends React.Component {
render() {
[
{
"thoughts": {
"text": "Starting a discord server for the AkiraAI community named AkiraAI,",
"reasoning": "Creating a space for the community to engage and interact, promote growth and learning",
"plan": "- Create a Discord account \n- Create the AkiraAI server \n- Set up server categories and channels \n- Invite members to join server",
"criticism": "None"
},
"command": {
"name": "message_agent",