Skip to content

Instantly share code, notes, and snippets.

Drifting away...

Dorell James dorelljames

Drifting away...
View GitHub Profile
View machine.js
const allProducts = ["Auction! Desktop", "Auction! Cloud", "Auction! Online", "Auction! Mobile", "Auction! Reservations"];
const orderMachine = Machine({
id: 'order',
initial: 'idle',
context: {
cart: [],
loggedInuser: {
organizations: null,
profile: null
View machine.js
id: "electricFan",
type: "parallel",
states: {
power: {
id: "power",
initial: "turnedOff",
states: {
turnedOff: {
on: {
View machine.js
const trafficLightMachine = Machine({
id: "trafficLight",
initial: "red",
on: {
NEXT: "green"
dorelljames /
Created Sep 10, 2019
Make "Explorer" sidebar scrollable


Fix the annoying Explorer sidebar of and make it scrollable. 😊


I use Google Chrome browser so I installed User CSS extension which basically allows one to add custom CSS to add a website.

Here's the custom css to add:

dorelljames /
Created Aug 22, 2019 — forked from pbojinov/
Two way iframe communication- Check out working example here:

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.


Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')


View App.js
import React from "react";
import axios from "axios";
class App extends React.Component {
constructor() {
this.state = {
todos: [],
isFetching: true
dorelljames /
Last active Apr 4, 2022
Adding Messenger Customer Chat Plugin To Your Site


  1. Install the Facebook SDK on your website.
  window.fbAsyncInit = function() {
      appId            : '1678638095724206', // REPLACE IF YOU WANT TO USE YOUR OWN FB APP
      autoLogAppEvents : true,
dorelljames /
Last active Jun 25, 2021
OS X: Configuring XDebug on Visual Studio Code

OS X (MacOS): Configuring XDebug on Visual Studio Code

This guide is intended to get you up and running with XDebug for Visual Studio Code on OS X.

My Setup

  • Visual Studio Code (Insiders) 1.10.0
  • OSX El Capitan 10.11.6
  • PHP 7.0.15 (installed via homebrew)
  • XDebug 2.5.0 (installed via homebrew)
dorelljames / AbanteCartValetDriver.php
Last active Feb 20, 2019
Laravel Valet Driver for AbanteCart. Save this file to ~/.valet/Drivers/ or ~/.config/valet/Drivers on new version
View AbanteCartValetDriver.php
class AbanteCartValetDriver extends ValetDriver
* Determine if the driver serves the request.
* @param string $sitePath
* @param string $siteName
* @param string $uri