Skip to content

Instantly share code, notes, and snippets.

View YazeedAlKhalaf's full-sized avatar
🚀
Youngest Participant in Hajj Hackathon

Yazeed AlKhalaf YazeedAlKhalaf

🚀
Youngest Participant in Hajj Hackathon
View GitHub Profile
@YazeedAlKhalaf
YazeedAlKhalaf / edugate-auto-rate.js
Last active April 21, 2024 12:25
edugate auto rate
(function () {
let feedbackType = "r"; // Change to 'l' for left side, since sometimes negative and positive are switched :)
let rows = Array.from(document.querySelectorAll("table tr"));
rows.forEach((row) => {
let radios = Array.from(row.querySelectorAll('input[type="radio"]'));
if (radios.length > 0) {
let selection;
if (feedbackType === "r") {
selection = radios.slice(-3);
@YazeedAlKhalaf
YazeedAlKhalaf / counter_bloc.dart
Last active December 14, 2021 14:39
counter bloc for medium blog
import 'dart:async';
// those are the events that the user can do,
// aka `add` to the bloc and manipulate the bloc state.
enum CounterEvent {
increment,
decrement,
reset,
}
### Keybase proof
I hereby claim:
* I am yazeedalkhalaf on github.
* I am yazeedalkhalaf (https://keybase.io/yazeedalkhalaf) on keybase.
* I have a public key ASD512-RbZQiNslSr3IP2CjgZfoEwg2EWBl81XKGzZvOWwo
To claim this, I am signing this object:
///
/// This DartPad is a custom tab bar made using Flutter.
///
/// Author: Yazeed AlKhalaf
/// Twitter: @YazeedAlKhalaf | https://twitter.com/YazeedAlKhalaf
///
/// ** Please credit the author if you use this code or some of it! 🙈🚀 **
/// ** DON'T REMOVE THOSE COMMENTS! **
///
///
/// This DartPad is profile card design that looks so cool! The
/// code is split into widgets that make interpreting the code
/// easier! You can change parameters to have different outcomes!
///
/// Author: Yazeed AlKhalaf
/// Twitter: @YazeedAlKhalaf | https://twitter.com/YazeedAlKhalaf
///
/// ** Please credit the author if you use this code or some of it! 🙈🚀 **
///
(function () {
let toInsertDiv = document.createElement("div");
let toInsertObject = document.createElement("object");
let toInsertIframe = document.createElement("iframe");
let pdfSrcUrl = prompt("Please enter the PDF source url");
if (pdfSrcUrl == null) return;
let height = "787px";
@YazeedAlKhalaf
YazeedAlKhalaf / emoji_guide.md
Created August 9, 2020 15:39
I made this gist to make a guideline for myself when using emojis in commits so that it becomes universal across my projects and decided to share it with the world so they can use it also! 🌍🚀💙
@YazeedAlKhalaf
YazeedAlKhalaf / append-to-path-zsh.sh
Last active July 23, 2020 20:04
This is a simple script for appending a path to PATH environment variable
#!/bin/sh
# Author: Yazeed AlKhalaf
# This is a simple script for appending a path to PATH environment variable
echo "" >> ~/.bashrc
echo "export PATH=\"\$PATH:$1\"" >> ~/.zshrc
#!/bin/sh
# This is simple script for getting OS name and it's version
# Script outputs the string in the format: dist_name-dist_version
# e.g. fedora-14
os=$(uname -s)
dist_name='unknown'
dist_version='unknown'
case "${os}" in
@YazeedAlKhalaf
YazeedAlKhalaf / append-to-path.bat
Last active August 5, 2020 09:14
A script to add a path to PATH environment variable on windows.
:: PATH-ADD - add a path to user path environment variable
@echo off
setlocal
:: set user path
set ok=0
for /f "skip=2 tokens=3*" %%a in ('reg query HKCU\Environment /v PATH') do if [%%b]==[] ( setx PATH "%%~a;%*" && set ok=1 ) else ( setx PATH "%%~a;%%~b;%*" && set ok=1 )
if "%ok%" == "0" setx PATH "%*"