Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View MassivDash's full-sized avatar

SpaceGhost MassivDash

View GitHub Profile
@MassivDash
MassivDash / docker-compose-build.yml
Created January 4, 2020 21:17
Gatsby V1 Docker Config, Node 10, phyton, image sharp, development
version: '3'
services:
node:
build:
context: .
args:
APP_DIR: ${APP_DIR}build
environment:
- NODE_ENV=development
container_name: gatsby-development
<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 / useD3.js
Last active November 6, 2021 08:47
useD3 react hook
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);
@MassivDash
MassivDash / .zshrc
Last active September 27, 2022 20:19
.zshrc aliases and helpers for mac and ubuntu
# GIT Aliases
alias commit='f(){
echo "commiting $@" ;
git add . ;
git commit -m "$1";
unset -f f;
}; f'
alias push="git push"
alias pushb='f(){
.heading
.line S3
.line
.text manager