Skip to content

Instantly share code, notes, and snippets.

View AhmedMohamedAbdelaty's full-sized avatar
😾
Focusing

Ahmed Muhammed AhmedMohamedAbdelaty

😾
Focusing
View GitHub Profile
@import url("https://capnkitten.github.io/BetterDiscord/Themes/Material-Discord/css/fonts/google-sans.css");
@import url("https://capnkitten.github.io/BetterDiscord/Themes/Material-Discord/css/icons.css");
@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@396&display=swap')
:root {
--app-font: "Google Sans", "Noto Kufi Arabic", sans-serif;
--app-bg: var(--main-alt);
--accent-hue: 224;
--accent-saturation: 71%;
@AhmedMohamedAbdelaty
AhmedMohamedAbdelaty / gist-downloader-plus.js
Last active May 8, 2024 18:37
a userscript that adds a download button to GitHub gists, allowing you to directly download GitHub gists as source files.
// ==UserScript==
// @name Gist Downloader Plus
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Directly download GitHub gists as source files.
// @author Ahmed Mohamed Abdelaty
// @match https://gist.github.com/*/*
// @grant GM_addStyle
// @grant GM_xmlhttpRequest
// @grant GM_download
@AhmedMohamedAbdelaty
AhmedMohamedAbdelaty / udemyCourseAddTime.js
Last active March 26, 2024 19:52
Add Time of each section next to the title, using regex to select the line from the file
import { readFileSync, writeFileSync } from "fs";
function editFile(filePath, time) {
const fileContent = readFileSync(filePath, "utf8").split("\n");
let counter = 0;
for (let i = 0; i < fileContent.length; i++) {
const line = fileContent[i];
if (line.match(/^- \[ \] Section \d+: \w+/)) {
fileContent[i] = `${line} (${time[counter]})`;
counter++;
}
@AhmedMohamedAbdelaty
AhmedMohamedAbdelaty / addTimeToHeadings.java
Last active February 5, 2024 09:49
Add the time of each lesson next to the Headings of the lesson in Markdown Using Java
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@AhmedMohamedAbdelaty
AhmedMohamedAbdelaty / line_randomizer.py
Created May 28, 2023 01:03
Line Randomizer Python
import random
# Read lines from input.txt
with open('input.txt', 'r') as f:
lines = f.readlines()
# Shuffle the lines randomly
random.shuffle(lines)
# Print shuffled lines with a newline after each line