Skip to content

Instantly share code, notes, and snippets.

View movahhedi's full-sized avatar
💻
Coding, probably.

Shahab Movahhedi movahhedi

💻
Coding, probably.
View GitHub Profile
@movahhedi
movahhedi / UpgradeMariaDB.md
Last active December 3, 2025 05:24 — forked from lionrajkumar/UpgradeMariaDB.md
Upgrade MariaDB to latest in Xampp

How to upgrade MySQL to MariaDB in XAMPP in 5 minutes on Windows

Here are the steps I used to to upgrad MySQL to MariaDB in XAMPP on Windows in about 5 minutes. After completing this process, MariaDB will look and work just like MySQL. You may even notice a performance increase in your website. No need to panic fellow developer, increased performance is perfectly normal and just one of the great benefits of MariaDB over MySQL.

IMPORTANT: Before you begin, always be sure to make a good backup. Do not do move instead of copy files in the instructions below as the original files may be required in order to back out and restore the original MySQL environment if it doesn't work out for you.

  1. Open a command prompt.
  2. Go to your xampp folder.
  3. Enter the following command: mysql/bin/mysql --version
  4. Take note of the version of MySQL you have installed. This is the version of MariaDB that you will need. You can now exit the command prompt as the rest of the instructions can be done through Windows Expl
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\DupFolderWithoutNodeModules]
@="Duplicate folder without node_modules"
[HKEY_CLASSES_ROOT\Directory\shell\DupFolderWithoutNodeModules\command]
@="C:\\\\Windows\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe -File \"G:\\System Related\\DuplicateFolderWithoutNode_Modules.ps1\" \"%L\""
@movahhedi
movahhedi / draw.html
Created July 30, 2024 13:08
A simple drawing canvas in pure JS
<html>
<script type="text/javascript">
let canvas,
ctx,
flag = false,
prevX = 0,
currentX = 0,
prevY = 0,
currentY = 0,
dotFlag = false,
@movahhedi
movahhedi / Amoozeshyar-Subject-Export.js
Created April 10, 2024 16:59
Exporting subjects from IAU's Amoozeshyar. Run it in the browser console.
const trs = document.querySelectorAll("#tableContainer tbody tr");
const dataColumnsRaw = [];
const dataArrayRaw = [];
const ths = document.querySelectorAll("#tableContainer thead tr th");
ths.forEach((th) => {
dataColumnsRaw.push(th.textContent?.trim());
});
@movahhedi
movahhedi / Ubuntu-Help.md
Last active January 5, 2024 11:09
Useful articles for setting up an Ubuntu server
@movahhedi
movahhedi / SimpleFetch.ts
Created July 16, 2023 20:27
AdmoPro's never-used SimpleFetch function
export async function SimpleFetch(url = "", Data = {}) {
const fd = new FormData();
fd.append("JsonEncodedAjaxData", JSON.stringify(Data));
for (const [key, value] of Object.entries(Data)) fd.append(key, value as string | Blob);
// Default options are marked with *
const response = await fetch(url, {
method: "POST", // *GET, POST, PUT, DELETE, etc.
mode: "cors", // no-cors, *cors, same-origin
cache: "no-cache", // *default, no-cache, reload, force-cache, only-if-cached
@movahhedi
movahhedi / jquery.ts
Created July 16, 2023 09:06
A simple extension of JQuery for TypeScript
import $ from "jquery";
declare global {
interface JQuery {
/**
* Serialize an html form to an object
*
* @param Additional Additional key-value pairs to append to the result
* @returns An object containing form data
*/