Skip to content

Instantly share code, notes, and snippets.

View dorelljames's full-sized avatar
🚲
Drifting away...

Dorell James dorelljames

🚲
Drifting away...
View GitHub Profile
@dorelljames
dorelljames / AbanteCartValetDriver.php
Last active February 20, 2019 02:15
Laravel Valet Driver for AbanteCart. Save this file to ~/.valet/Drivers/ or ~/.config/valet/Drivers on new version
<?php
class AbanteCartValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
@dorelljames
dorelljames / reactcebuseries-2
Created July 6, 2019 05:52
React Cebu Series: Zeto to Hero 2
here
@dorelljames
dorelljames / App.js
Last active August 3, 2019 08:48
App.js
import React from "react";
import axios from "axios";
class App extends React.Component {
constructor() {
super();
this.state = {
todos: [],
isFetching: true
};
@dorelljames
dorelljames / webtask-io-scrollable.md
Created September 10, 2019 08:03
Make webtask.io "Explorer" sidebar scrollable

Objective

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

How?

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
dorelljames / README.md
Created August 22, 2019 08:58 — forked from pbojinov/README.md
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

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

Parent

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

iframe

@dorelljames
dorelljames / machine.js
Created October 30, 2020 11:04
Generated by XState Viz: https://xstate.js.org/viz
const trafficLightMachine = Machine({
id: "trafficLight",
initial: "red",
on: {
NEXT: "green"
}
})
@dorelljames
dorelljames / machine.js
Created October 30, 2020 17:46
Generated by XState Viz: https://xstate.js.org/viz
Machine({
id: "electricFan",
type: "parallel",
states: {
power: {
id: "power",
initial: "turnedOff",
states: {
turnedOff: {
on: {
@dorelljames
dorelljames / osx-vscode-xdebug-configuration.md
Last active June 25, 2021 13:41
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
dorelljames / machine.js
Last active September 29, 2021 16:49
Generated by XState Viz: https://xstate.js.org/viz
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
@dorelljames
dorelljames / machine.js
Last active August 26, 2022 05:21
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions