Skip to content

Instantly share code, notes, and snippets.

View Rochdy's full-sized avatar
👨‍💻

Roshdy Rochdy

👨‍💻
View GitHub Profile
{
"laravel": [{
"error": "MassAssignmentException",
"sol": "The Fillable array in the model not found"
},
{
"error": "Blank Page",
"sol": [
"Server Requirements < Laravel Version Requirements",
"Main folder was deleted"
@Rochdy
Rochdy / movies.go
Last active February 18, 2023 03:06
package main
import (
"fmt"
"net/http"
"log"
"io/ioutil"
"os"
"regexp"
"strings"
@Rochdy
Rochdy / autoScroll.js
Created February 18, 2023 03:04
Auto scroll youtube shorts
const observer = new MutationObserver(
(mutationList, observer) => {
for (const mutation of mutationList) {
if (mutation.type === 'attributes' && mutation.target.localName === 'video') {
//Change the video playback speed if you think people are boring
//mutation.target.playbackRate = 1.25;
mutation.target.loop = false;
mutation.target.onended = (e) => document.getElementById('shorts-container').scrollTop += mutation.target.scrollHeight;
}
}
@Rochdy
Rochdy / gist:c2f850a0be21c65806e669f7ceaaff8a
Last active May 20, 2023 20:45
Alert upon tests output
#!/bin/bash
#Change the test command as your app usage
output="$(npm test)"
cat <<< "${output}"
# Instead of failing you can place a word that appears if tests failed
if grep failing <<< "${output}" > /dev/null; then
#Im using sox/play, you can use vlc or any audio player..
play https://www.roshdy.dev/assets/f-test.mp3
# Instead of passing you can place a word that appears if tests passed