Skip to content

Instantly share code, notes, and snippets.

View machour's full-sized avatar

Mehdi Achour machour

View GitHub Profile
@machour
machour / remix.patch
Created May 1, 2023 12:05
Fixes compatibility with old devices
diff --git a/node_modules/@remix-run/dev/dist/compiler/compileBrowser.js b/node_modules/@remix-run/dev/dist/compiler/compileBrowser.js
index 517068e..2846c2a 100644
--- a/node_modules/@remix-run/dev/dist/compiler/compileBrowser.js
+++ b/node_modules/@remix-run/dev/dist/compiler/compileBrowser.js
@@ -87,6 +87,7 @@ const createEsbuildConfig = (config, options) => {
entryPoints,
outdir: config.assetsBuildDirectory,
platform: "browser",
+ target: ["safari12.1"] ,
format: "esm",
<html>
<head>
<title>Mandelbrot Set</title>
</head>
<body>
<canvas id="mandelbrot" width="800" height="600"></canvas>
<script>
const canvas = document.getElementById('mandelbrot');
@machour
machour / @remix-run+react+1.7.5.patch
Created November 10, 2022 15:27
Remove nullish coalescing operator from @remix-run/react
diff --git a/node_modules/@remix-run/react/dist/components.js b/node_modules/@remix-run/react/dist/components.js
index f947287..e7cc1f5 100644
--- a/node_modules/@remix-run/react/dist/components.js
+++ b/node_modules/@remix-run/react/dist/components.js
@@ -773,7 +773,7 @@ method = "get") {
let {
id
} = useRemixRouteContext();
- let resolvedPath = reactRouterDom.useResolvedPath(action ?? "."); // Previously we set the default action to ".". The problem with this is that
+ let resolvedPath = reactRouterDom.useResolvedPath(action ? action : "."); // Previously we set the default action to ".". The problem with this is that
@machour
machour / gist:7b018783c492a3c1e588c79686e9ec7e
Created August 28, 2022 17:46
VsCode settings for PHP
// extensions.json
{
"recommendations": [
"lacroixdavid1.vscode-format-context-menu",
"bmewburn.vscode-intelephense-client",
"EditorConfig.EditorConfig"
]
}
// settings.json
{
fix(remix-dev): add ability to use tsconfig `paths` aliases other than `~` test #4883
Summary
Jobs
build (ubuntu-latest)
build (ubuntu-latest)
Started 11m 51s ago
Search logs
1s
Current runner version: '2.288.1'
Operating System
@machour
machour / RbacMigration.php
Last active July 18, 2022 22:47
[yii2] How to migrate from PHP Rbac to DB Rbac
<?php
namespace console\controllers;
use Yii;
use yii\console\Controller;
/**
* I needed to migrate from files-based RBAC to db-based RBAC, here's how I've done it
*
@machour
machour / yii3.md
Last active April 5, 2019 03:20
This is a draft of my draft at https://www.yiiframework.com/wiki/2547/draft-understanding-yii-3. Stay drafty!

Understanding Yii 3

Introduction

This document is intended for an audience already familiar with Yii2

Yii 3 is the second major rewrite of the Yii framework.

Originally started in the 2.1 branch, it was later decided to switch to the 3.X series because of all the backward compatibility breakage. Starting with 3.0, Yii will follow the Sementic Versionning.

<VirtualHost *:80>
    Define SITE_BASE ${SERVER_BASE}/customer/example.com
    ServerName  example.com

    ProxyRequests Off
    ProxyPass / http://example.com/
    ProxyPassReverse / http://example.com/

 LogLevel warn