Skip to content

Instantly share code, notes, and snippets.

View alfahami's full-sized avatar
🏠
Working from home

AL-FAHAMI Toihir alfahami

🏠
Working from home
  • DXC Technology
  • Rabat-Salé, Morocco
  • 19:24 (UTC +01:00)
  • LinkedIn in/alfahami
View GitHub Profile

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

Abstraction = Interface (What it does) + Implementation (How it does it)

Abstraction has Multiple Layers Seven Steps of solving a problem:

  1. Work Example By Hand (Solve Small instance by hand | unclear problem | Domain Knowledge )
  2. Write Down What you did (Write Down Exact Steps | Just that instance | Tricky: Do without thinking)
  3. Find Patterns (Algorithm for any instance | Repetitions | Conditions | Values, Try step1+2 again | Different Inputs)
  4. Check By Hand (Incorrect Pattern? Check with different inputs)
  5. Translate To Code (Programming Language)
  6. Run Test Cases
@alfahami
alfahami / freehosting_ftp.md
Last active February 25, 2022 10:36
How to configure freehosting.com FTP client software?

FTP host: cpanel.freehosting.com
FTP port: 21
SSL encrytion: optional
Remote directory: public_html

Source

@alfahami
alfahami / countdown.js
Created March 11, 2020 18:05
countdown timer
(function($) {
$.fn.countdown = function(options, callback) {
//custom 'this' selector
thisEl = $(this);
// array of custom settings
var settings = {
date: null,
format: null
};
@alfahami
alfahami / active-scroll.js
Created March 11, 2020 18:02
highlight navbar item menu on scroll
if ($) {
// Basice Code keep it
$(document).ready(function() {
$(document).on("scroll", onScroll);
//smoothscroll
$('a[href^="#"]').on("click", function(e) {
e.preventDefault();
$(document).off("scroll");
$("a").each(function() {
@alfahami
alfahami / sticky-menu.js
Created March 11, 2020 17:58
Keep the background color of the navbar after reload without using cookies
window.addEventListener("scroll", function() {
if (window.scrollY > 150) {
document.querySelector("#jsc-nav").style.background = "rgba(0,0,0,0.9)";
} else {
document.querySelector("#jsc-nav").style.background = "transparent";
}
});
// Scroll and keep the background navbar color after reload
$(document).ready(function() {