Skip to content

Instantly share code, notes, and snippets.

View bsaqqa's full-sized avatar

Baraa A. Al-Saqqa bsaqqa

View GitHub Profile
@bsaqqa
bsaqqa / moodle-nginx-config
Created August 20, 2023 04:47 — forked from jeffersonmartin/moodle-nginx-config
Nginx Config for Moodle (with proper rewrite/paths)
server {
listen 80;
server_name learn.mydomain.com;
return 301 https://learn.mydomain.com$request_uri;
}
server {
listen 443 ssl;
server_name learn.mydomain.com;
@bsaqqa
bsaqqa / removeVendorsfromFoldersProjects.sh
Created July 12, 2021 07:44
Remove `vendor` and `node_modules` folders from all folders of current directory
# Color
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color
function red {
printf "${RED}$@${NC}\n"
}
@bsaqqa
bsaqqa / React Native Clear Cache
Created July 17, 2020 06:56 — forked from jarretmoses/React Native Clear Cache
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
@bsaqqa
bsaqqa / socket.php
Last active March 10, 2019 09:54
socket.io php for laravel
<?php
// For laravel lunch
define('LARAVEL_START', microtime(true));
require_once __DIR__ . '/vendor/autoload.php';
$app = require_once __DIR__ . '/bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);