Skip to content

Instantly share code, notes, and snippets.

View alexcmgit's full-sized avatar

Alex Castro alexcmgit

View GitHub Profile
rel="noopener noreferrer external"
<a class="icon-container" target="_blank" rel="noopener noreferrer external" href="https://mail.google.com/mail/u/0/?view=cm&fs=1&[email protected]&tf=1"></a>
.no-highlight-on-cursor-pointer{
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
function generateRandomColorPalette(userColor = {}, userVariant = {}) {
const { color: defaultColor } = generateRandomColor();
const defaultVariant = { vR: 15, vG: 15, vB: 15, vA: 200 };
const color = Object.assign({}, defaultColor, userColor);
const variant = Object.assign({}, defaultVariant, userVariant);
const { r, g, b, a } = color;
@alexcmgit
alexcmgit / colorful.js
Created March 22, 2020 21:09
Pack of 4 Gists to create awesome random colors and palette colors
function generateRandomNumber(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min);
}
function generateRandomColor(userConfig = {}) {
const defaultConfig = {
r: [0, 255],
g: [0, 255],
b: [0, 255],
a: [1, 1],
function interpolate(xInterval, yInterval) {
let [x0, x1] = xInterval;
let [y0, y1] = yInterval;
return function (xA) {
if (xA > x1) xA = x1;
else if (xA < x0) xA = x0;
const yA = y0 + (y1 - y0) * ((xA - x0) / (x1 - x0));
function abbreviateNumber(num) {
return Math.abs(num) > 999
? Math.sign(num) * (Math.abs(num) / 1000).toFixed(1) + 'k'
: Math.sign(num) * Math.abs(num);
}
@alexcmgit
alexcmgit / git.md
Created May 19, 2020 15:59 — forked from leocomelli/git.md
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

.theme-dark {
--header-primary: #fff;
--header-secondary: #b9bbbe;
--text-normal: #dcddde;
--text-muted: #72767d;
--text-link: #00b0f4;
--channels-default: #8e9297;
--interactive-normal: #b9bbbe;
--interactive-hover: #dcddde;
--interactive-active: #fff;
::-webkit-scrollbar {
width: 12px;
background-color: transparent;
}
::-webkit-scrollbar-button {
display: none;
width: 0;
height: 0;
}