Skip to content

Instantly share code, notes, and snippets.

View krypton225's full-sized avatar

Khaled Mohamed krypton225

  • qTech (Alqemam)
  • Egypt
  • 16:38 (UTC +03:00)
View GitHub Profile
@krypton225
krypton225 / useful-functions.scss
Last active May 10, 2023 19:13
Useful functions in SCSS.
@function get-half($number) {
@return $number / 2;
}
@function square($number) {
@return $number * $number;
}
@function rem($px-val) {
$rem-val: $px-val / $base-fz;
"javascript.inlayHints.parameterNames.enabled": "all",
"typescript.inlayHints.parameterNames.enabled": "all",
"javascript.inlayHints.variableTypes.enabled": true,
"typescript.inlayHints.variableTypes.enabled": true,
"editor.inlayHints.padding": true,
"editor.inlayHints.fontSize": 13,
"javascript.inlayHints.enumMemberValues.enabled": true,
"javascript.inlayHints.functionLikeReturnTypes.enabled": true,
"javascript.inlayHints.parameterTypes.enabled": true,
"javascript.inlayHints.propertyDeclarationTypes.enabled": true,
@krypton225
krypton225 / generate-id.js
Last active January 3, 2023 17:26
Generating IDs in array of objects.
/*
* This is just a module for generating IDs when you want mapping through array of objects (Useful in React JS).
* Learn about generator functions here: https://javascript.info/generators
* This code is made by using (Reavelling Design Pattern).
* Learn about this pattern here (Arabic explain) : shorturl.at/jkUW4
*/
/*
* File and name it: generate-id.js (feel free to name it as you want).
* Best practice to put this file in folder and name it: utils.
@krypton225
krypton225 / mixins.scss
Last active May 15, 2023 18:38
Useful Mixins In SCSS
/*
* Author: Khaled Mohamed.
* Last updated: 15-5-2023.
*/
@charset "UTF-8";
@use "sass:list";
@use "sass:math";
/* ================================================= */
@krypton225
krypton225 / CSS-snippets.json
Created July 15, 2022 18:05
This is just a CSS-snippets in VSCode!
{
"Reset all properties shortcut": {
"scope": "css",
"prefix": "reset",
"body": "margin: 0; \npadding: 0; \nbox-sizing: border-box;",
"description": "This is for reset all properties in css *"
},
"Remove tap highlighted color shortcut": {
"scope": "css",
"prefix": "rmv-tap",