Skip to content

Instantly share code, notes, and snippets.

View wanbinkimoon's full-sized avatar

Nicola Bertelloni wanbinkimoon

View GitHub Profile
import { mount } from '@cypress/react';
import '~/main.css';
import { Space } from './Space';
it('Should have defined height in a column', () => {
mount(
<div className="flex flex-col">
<Space units={2} data-test-id="col" />
</div>
);
import { CSSProperties, useEffect, useRef, useState } from 'react';
import cx from 'classnames';
export type SpaceBrops = {
className?: string;
styles?: CSSProperties;
'data-test-id'?: string;
} & (
| {
/**
import { ButtonHTMLAttributes } from 'react';
import cx from 'classnames';
export type ButtonProps = {
'data-test-id'?: string;
/**
* The content of the button.
* @default 'Button'
* @type string
* @required
body {
padding: 24px;
display: flex;
justify-content: center;
}
@wanbinkimoon
wanbinkimoon / gist:0771fea9b199ce5ac32edc8f6d815584
Last active March 14, 2018 16:44
p5 multiple graphics in es6
import p5 from 'p5';
import 'p5/lib/addons/p5.sound';
const sketch = p => {
let canvas;
let scene1;
let scene2;
p.setup = () => {
p.createCanvas(p.windowWidth, p.windowHeight);
@wanbinkimoon
wanbinkimoon / italians.json
Created July 22, 2017 16:50
Italian population from 1950 till today
[
{
"females": 392987,
"country": "Italy",
"age": 28,
"males": 362615,
"year": 1950,
"total": 755602
},
{
@wanbinkimoon
wanbinkimoon / linked data – JSON-LD
Last active November 10, 2016 15:55
linked data JSON-LD
{
"@context":"http://schema.org",
"@id":"http://data.wordlift.io/wl0116/entity/linked_data",
"@type":"CreativeWork",
"name":"Linked data",
"description":"Back in 2006 Tim Berners-Lee described linked data as follows: The Semantic Web isn't just about putting data on the web. It is about making links, so that a person or machine can explore the web of data. With linked data, when you have some of it, you can find other, related, data. In computing linked data […]",
"image":[
"https://wordlift.io/wp-content/uploads/2016/10/LOD_Cloud_2014.svg_.png"
],
"sameAs":[