Skip to content

Instantly share code, notes, and snippets.

View ayoubjamouhi's full-sized avatar

Ayoub JAMOUHI ayoubjamouhi

View GitHub Profile
git branch -m LI-21-whichlist-heart main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
import React from "react";
import { Formik, Form, Field, ErrorMessage } from "formik";
import * as Yup from "yup";
import "bootstrap/dist/css/bootstrap.css";
import { useDispatch } from "react-redux";
import { ProjectStore } from "../../store/Project/actions";
const LoginSchema = Yup.object().shape({
title: Yup.string()
.min(3, "projectType must be 3 characters at minimum")
const isVideoPlaying = video => !!(video.currentTime > 0 && !video.paused && !video.ended && video.readyState > 2);
copy($url, $topath);
I know this is an old thread, but it needs a better answer. You shouldn't need to set the permissions to 777, that is a security problem as it gives read and write access to the world. It may be that your apache user does not have read/write permissions on the directory.
Here's what you do in Ubuntu
Make sure all files are owned by the Apache group and user. In Ubuntu it is the www-data group and user
sudo chown -R www-data:www-data /path/to/webserver/www
Next enabled all members of the www-data group to read and write files
if (!file_exists($path)) {
mkdir($path, 0755, true);
}
@ayoubjamouhi
ayoubjamouhi / Errors axios laravel
Last active January 25, 2022 10:14
Errors axios laravel handling
const errors = error.response;
if (errors.status === 422) {
this.$vs.loading.close();
this.$vs.notify({
title: "Danger",
text: 'Please check your from data',
color: "danger",
});
}
@ayoubjamouhi
ayoubjamouhi / jvzoo-IPN-verification.js
Created August 4, 2021 14:45 — forked from OffS3c/jvzoo-IPN-verification.js
JVZoo IPN verification function (ported from PHP one)
/*
Hello dear developers,
I ported this function for JVZoo IPN verification from PHP one at
(https://jvzoo.zendesk.com/hc/en-us/articles/206456857-JVZIPN-How-to-create-your-own-integrated-script) and
wanted to share that with all fellow devs.
REF: https://jvzoo.zendesk.com/hc/en-us/articles/206456857-JVZIPN-How-to-create-your-own-integrated-script
sudo netstat -tulpn
@ayoubjamouhi
ayoubjamouhi / gist:71abf990db920373d57630d903f701b2
Created April 11, 2021 17:21
give user2 permission for using graphical who installed by root
[dotnet@myarch ~]$ cat ~/.Xauthority | sudo -u dotnet -i tee .Xauthority > /dev/null