Skip to content

Instantly share code, notes, and snippets.

View diogocapela's full-sized avatar

Diogo Capela diogocapela

View GitHub Profile
@diogocapela
diogocapela / CSS-color-var.md
Created June 27, 2023 18:52 — forked from tunguskha/CSS-color-var.md
Darken & Lighten colors in pure CSS using variables.
:root {
  /* Base color using HSL */
  --hue: 207;
  --saturation: 64%;
  --light: 44%;
  
  /* Base color in variable */
  --primary-color: hsl(var(--hue), var(--saturation), var(--light));
 /* Base color lighten using calc */
console.log('L1');
setTimeout(() => console.log('L2'), 0);
new Promise((resolve) => {
console.log('L3');
setImmediate(() => console.log('L4'));
process.nextTick(() => console.log('L5')) // node backend only
resolve();
})
.then(() => console.log('L6'));
console.log('L7');
for (var i = 0; i < 4; i++) {
setTimeout(() => {
console.log(i);
}, 0);
}
function greet(person) {
if (person == { name: 'amy' }) {
return 'hey amy'
} else {
return 'hey arnold'
}
}
console.log(greet({ name: 'amy' }))
@diogocapela
diogocapela / country-dial-codes.json
Created March 25, 2020 15:21
country-dial-codes.json
[
{ "name": "Afghanistan", "iso": "AF", "flag": "🇦🇫", "dialCode": "+93" },
{ "name": "Aland Islands", "iso": "AX", "flag": "🇦🇽", "dialCode": "+358-18" },
{ "name": "Albania", "iso": "AL", "flag": "🇦🇱", "dialCode": "+355" },
{ "name": "Algeria", "iso": "DZ", "flag": "🇩🇿", "dialCode": "+213" },
{ "name": "American Samoa", "iso": "AS", "flag": "🇦🇸", "dialCode": "+1-684" },
{ "name": "Andorra", "iso": "AD", "flag": "🇦🇩", "dialCode": "+376" },
{ "name": "Angola", "iso": "AO", "flag": "🇦🇴", "dialCode": "+244" },
{ "name": "Anguilla", "iso": "AI", "flag": "🇦🇮", "dialCode": "+1264" },
{ "name": "Antarctica", "iso": "AQ", "flag": "🇦🇶", "dialCode": "+672" },
@diogocapela
diogocapela / english-prefixes-list.txt
Created January 24, 2020 21:09
english-prefixes-list
ab
ad
an
ante
anti
auto
be
bi
centi
circum
@diogocapela
diogocapela / keybase.md
Created November 27, 2019 16:46
keybase.md

Keybase proof

I hereby claim:

  • I am diogocapela on github.
  • I am diogocapela (https://keybase.io/diogocapela) on keybase.
  • I have a public key ASDq9CGecwsL3cNrUS3gOKPYdlW1lUoMWbFmSE1bSSyo6go

To claim this, I am signing this object:

scrollbar-width: none;
overflow: -moz-scrollbars-none;
-ms-overflow-style: none;
&::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
}
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <semaphore.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
@diogocapela
diogocapela / main.c
Created April 17, 2019 17:51
Error: No such file or directory
#include <errno.h>
#include <fcntl.h>
#include <semaphore.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>