Skip to content

Instantly share code, notes, and snippets.

Avatar

Mehdi Achour machour

  • Tunisia
  • 05:14 (UTC +01:00)
  • Twitter @mac_hour
View GitHub Profile
View mandelbrot-gpt3.html
<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
View @remix-run+react+1.7.5.patch
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
View gist:7b018783c492a3c1e588c79686e9ec7e
// extensions.json
{
"recommendations": [
"lacroixdavid1.vscode-format-context-menu",
"bmewburn.vscode-intelephense-client",
"EditorConfig.EditorConfig"
]
}
// settings.json
{
View remix-run#2412-stuck.txt
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
View Triage.md
@machour
machour / RbacMigration.php
Last active July 18, 2022 22:47
[yii2] How to migrate from PHP Rbac to DB Rbac
View RbacMigration.php
<?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!
View yii3.md

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.

View http-vhost.conf.md
<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
View ChangeLog.md

1.4.1 (2017-12-15)

Bug Fixes

  • Fix application version number (dd56652)

1.4.0 (2017-12-12)