Skip to content

Instantly share code, notes, and snippets.

Avatar

SpaceGhost MassivDash

View GitHub Profile
View gist:86a152e762975f2601ff3895830be89e
import React from 'react';
import * as d3 from 'd3';
export const useD3 = (renderChartFn, dependencies) => {
const ref = React.useRef();
React.useEffect(() => {
renderChartFn(d3.select(ref.current));
return () => {};
}, dependencies);
View LegoCounter.svelte
<script>
let count = 2;
$: arrayOfKeys = [...Array(count).keys()]
function randomInteger(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
const imgUrl = ['https://poszukiwaczefrajdy.pl/services/picasso/thumb/4fd625949e896384e11ef6797aa66551.jpg' , 'https://a.allegroimg.com/s1024/0c8701/5b77fff3466b91a9e75ec4fe3b7b.jpg', 'https://thumbs.img-sprzedajemy.pl/1000x901c/a1/59/d7/lego-ninjago-jay-ninja-oryginalna-nowa-figurka-plastik-lodz-352890867.jpg', 'https://0.allegroimg.com/s1024/0c125e/7135eba343498612667b2372b0c0',
'https://totti.pl/pol_pl_LEGO-NINJAGO-Wyscig-uliczny-Wezowego-Jaguara-70639-22333_3.jpg', 'https://b.allegroimg.com/s512/03ca8a/2b6c05a94a92a76edbf889ae605b/LEGO-FIGURKA-LUDZIK-NINJAGO-KAI', 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQq9q3gdELan1auZZyJgWK_ZvTlMA8SHdiLMQ&usqp=CAU' , 'https://lh3.googleusercontent.com/proxy/DT_yQ0MZYwfBRf3-2fPS_yRg9yMaS3uZOf6GQZ44t6YOQAbmlCvpEoTBvAoTNfwrHv9K3aXZ08562Y5tbbtdh_oh4nEx7Ej1DkZFm3N7ZJTo7DTwnxeZOyaw5kQiA_Q6cm8u
@MassivDash
MassivDash / docker-compose-build.yml
Created Jan 4, 2020
Gatsby V1 Docker Config, Node 10, phyton, image sharp, development
View docker-compose-build.yml
version: '3'
services:
node:
build:
context: .
args:
APP_DIR: ${APP_DIR}build
environment:
- NODE_ENV=development
container_name: gatsby-development