Skip to content

Instantly share code, notes, and snippets.

View diogocapela's full-sized avatar

Diogo Capela diogocapela

View GitHub Profile
@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>
@diogocapela
diogocapela / random.c
Created April 17, 2019 15:36
Get Random Number in C
int getRandomIntBetween(int min, int max) {
srand(time(NULL) * getpid() << 16);
int randomNumber = (rand() % max) + min;
return randomNumber;
}
@diogocapela
diogocapela / Makefile
Created April 1, 2019 11:20
Exercício Moodle Aula LPROG
# Makefile for using flex with bison
#
# The executable receives the name of the current folder
# Do not use spaces in the name of the folder
#
# The .lex and .y files used are the first ones found by ls
#
# If there is a .txt file, it will be used as the input of the executable
#
# This Makefile works on Linux and on OSX
@diogocapela
diogocapela / Makefile
Created March 29, 2019 19:58
Makefile LPROG
# Makefile de exemplo de uso do flex
#
# O programa fica com o nome da pasta onde estamos
# Não usar espaços no nome!
#
# O ficheiro flex usado é o primeiro encontrado pelo ls
#
# Se existir um ficheiro .txt este será usado como standard input
# ao correr o programa
#
@diogocapela
diogocapela / Makefile
Created March 28, 2019 21:59
Makefile de LPROG (Genérico para macOS e Windows)
# Makefile for using flex with bison
#
# The executable receives the name of the current folder
# Do not use spaces in the name of the folder
#
# The .lex and .y files used are the first ones found by ls
#
# If there is a .txt file, it will be used as the input of the executable
#
# This Makefile works on Linux and on OSX
@diogocapela
diogocapela / reset.css
Last active February 10, 2019 17:44
CSS Reset
::selection {
/* placeholder */
}
* {
box-sizing: border-box;
}
html {
/**
@diogocapela
diogocapela / easing.css
Created January 3, 2019 01:14 — forked from adamwathan/easing.css
Easing CSS variables
:root {
--ease-in-quad: cubic-bezier(.55, .085, .68, .53);
--ease-in-cubic: cubic-bezier(.550, .055, .675, .19);
--ease-in-quart: cubic-bezier(.895, .03, .685, .22);
--ease-in-quint: cubic-bezier(.755, .05, .855, .06);
--ease-in-expo: cubic-bezier(.95, .05, .795, .035);
--ease-in-circ: cubic-bezier(.6, .04, .98, .335);
--ease-out-quad: cubic-bezier(.25, .46, .45, .94);
--ease-out-cubic: cubic-bezier(.215, .61, .355, 1);