Skip to content

Instantly share code, notes, and snippets.

@MohammedEsafi
MohammedEsafi / resetup.sh
Last active February 18, 2024 00:22
Just a script I use to reset my computer configuration at 1337 school, as it always gets lost 😋
#!/bin/bash
# ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
# Restore settings files | script used: https://github.com/MohammedEsafi/FOLDSettings
# ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
python3 ~/.init/baCkup/drive.py -f restore &> /dev/null
# ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
# General UI/UX
.name "Norman"
.comment "The promised Neverland is so good!"
sti r1, %12, %1 # 7 bytes
xor r1, r1, r1 # 5
live %12 # 5
zjmp %-5 # 3
# 0b 68 01 00 0c 00 01 08 54 01 01 01 01 00 00 00 0c 09 ff fb

Commit Message Guidelines

Effective and organized commit messages are essential for maintaining a coherent project history. This document provides a structured and comprehensive guide to crafting commit messages.

1. Commit Message Format

Each commit should have the format:

[optional scope]: 
@MohammedEsafi
MohammedEsafi / .gitignore
Created October 30, 2023 15:25 — forked from wojtekmaj/.gitignore
How to upgrade Yarn to Yarn Modern (v4 at the moment) seamlessly
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

Toggle Git Hooks activation and deactivation using these commands.

  • Disable git hooks
git config core.hooksPath no-hooks
  • Re-enable git hooks
git config --unset core.hooksPath
async bindInvestment({ investmentId, portalUser }) {
const investment = await PmInvestmentOrderModel.findById(investmentId);
if (!investment) {
throw new NotFound('The investment not found.');
}
if (PmInvestmentOrderStatusRev.CANCELED.includes(investment.status)) {
throw new BadRequest("You can't bind the canceled investment.");
}
if (PmInvestmentOrderStatusRev.BINDING.includes(investment.status)) {
throw new BadRequest('The investment already been binded.');