Skip to content

Instantly share code, notes, and snippets.

Avatar

Diogo Capela diogocapela

View GitHub Profile
@diogocapela
diogocapela / easing.css
Created Jan 3, 2019 — forked from adamwathan/easing.css
Easing CSS variables
View easing.css
: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);
@diogocapela
diogocapela / moment-js-timezones.txt
Created Sep 7, 2018
List of All Moment.js Timezones
View moment-js-timezones.txt
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
View Escrutinio.java
import java.util.ArrayList;
import java.util.List;
public class Escrutinio {
// variaveis de insância
private List<Candidato> candidatos;
private int numEleitores;
private int numVot;
private int data;
View reset.css
::selection {
/* placeholder */
}
* {
box-sizing: border-box;
}
html {
/**
@diogocapela
diogocapela / example.java
Created May 31, 2018
JavaFX UI methods example
View example.java
// Updating a JavaFX table when UI loads example
private void updateView() {
col1.setCellValueFactory(new PropertyValueFactory<>("id"));
col2.setCellValueFactory(new PropertyValueFactory<>("username"));
col3.setCellValueFactory(new PropertyValueFactory<>("email"));
col4.setCellValueFactory(new PropertyValueFactory<>("password"));
table.setItems(FXCollections.observableArrayList(
system.getUserRegistry()
));
}
View math-symbols.txt
⁰¹²³⁴⁵⁶⁷⁸⁹₀₁₂₃₄₅₆₇₈₉
×
·
∈ ∉
View filtro_media.java
/**
* Aplicar filtro da média a uma matriz.
*/
public int[][] filterMedia(int[][] matrix) {
int[][] novaMatrix = new int[matrix.length][matrix.length];
int[][] directions = new int[][] {
{-1, -1},
{-1, 0},
{-1, 1},
{ 0, -1},
@diogocapela
diogocapela / css_colors.js
Created Dec 16, 2017
All the 147 CSS colors in one JavaScript array.
View css_colors.js
let CSS_COLORS = ['aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure', 'beige', 'bisque', 'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan', 'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgrey', 'darkgreen', 'darkkhaki', 'darkmagenta', 'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue', 'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray', 'dimgrey', 'dodgerblue', 'firebrick', 'floralwhite', 'forestgreen', 'fuchsia', 'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'gray', 'grey', 'green', 'greenyellow', 'honeydew', 'hotpink', 'indianred', 'indigo', 'ivory', 'khaki', 'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan', 'lightgoldenrodyellow', 'lightgray', 'lightgrey', 'lightgreen', 'lightpink', 'lightsalmon', 'lightseagreen', 'lights