Skip to content

Instantly share code, notes, and snippets.

View machour's full-sized avatar

Mehdi Achour machour

View GitHub Profile
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 / 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
{
@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
<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.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",