Skip to content

Instantly share code, notes, and snippets.

View elcoreman's full-sized avatar

Mohammad Farshadpour elcoreman

View GitHub Profile
.mr-version-controls.mr-version-menus-container {
display: none !important;
}
.merge-request-tabs-container,
.breadcrumbs-containe,
.detail-page-header-body,
.detail-page-header,
.nav-sidebar,
.navbar-gitlab,
@elcoreman
elcoreman / scaleNumber.md
Last active February 3, 2023 17:05
Scale number from range A to range B

Sometimes we need to transfer a number from range A to range B
I wrote this in ts but you can easily change it to your preferred language
hope this save your time.

type Scale = (
  number: number,
  from: [number, number],
  to: [number, number]
) => number;
@elcoreman
elcoreman / PX to REM.md
Last active February 3, 2023 17:43
Convert all px values to rem in sass style files by Regex

type ctrl+h on VsCode

On Find input insert:

\s(-*[1-9]\d*)px

On Replace input insert:

rem($1)
@elcoreman
elcoreman / functionToConst.md
Last active February 3, 2023 17:44
Convert javascript functions to const by Regex

Type ctrl+h on VsCode

On Find input insert:

^function (.+)(\(.*\))

On Replace input insert:

const $1 = ($2) =>