Skip to content

Instantly share code, notes, and snippets.

View DaveBitter's full-sized avatar
🚀

Dave Bitter DaveBitter

🚀
View GitHub Profile
(async () => {
const promiseA = new Promise((resolve, reject) => {
setTimeout(() => {
resolve({data: 'dataA', error: 'errorA'});
}, 2000);
})
const promiseB = new Promise((resolve, reject) => {
setTimeout(() => {
resolve({data: 'dataB', error: 'errorB'});
// Libs
import { useState } from "react";
// Utils
// Type
export type UseShareType = {
type: 'copy' | 'share';
content: string;
}
@DaveBitter
DaveBitter / README.md
Last active May 19, 2020 08:58
Export Simplified Contentful Data

Export Simplified Contentful Data

Contentful exports can be bloated. This utility exports Contentful in a simplified result.

Usage

  • Add the below file to your project and import the utility.
  • Install required dependencies: yarn install dotenv contentful-export

Configuration

@DaveBitter
DaveBitter / Carousel.js
Created March 25, 2020 18:13
Example component for Mirabeau Boilerplate (https://github.com/mirabeau-nl/frontend-boilerplate)
@DaveBitter
DaveBitter / BackdropFilterModal.js
Created March 20, 2019 19:46
CSS backdrop-filter
// Constants
const constants = {
attributes: {
DATA_TRIGGER: 'data-trigger',
DATA_MODAL: 'data-modal',
DATA_CLOSE: 'data-close',
DATA_IS_OPEN: 'data-is-open',
DATA_OVERLAY: 'data-overlay'
@DaveBitter
DaveBitter / GridModal.js
Last active March 1, 2019 16:11
Animated grid modal
// Helpers
const setAsyncTimeout = (cb, timeout = 0) =>
new Promise(resolve => setTimeout(() => {
cb();
resolve();
}, timeout));
// Constants
const constants = {
attributes: {
@DaveBitter
DaveBitter / setAsyncTimeout.js
Last active October 10, 2022 22:44
Async implementation of the setTimeout function
const setAsyncTimeout = (cb, timeout = 0) => new Promise(resolve => {
setTimeout(() => {
cb();
resolve();
}, timeout);
});
// Instead of nesting setTimeout functions...
const doStuff = () => {
setTimeout(() => {
@DaveBitter
DaveBitter / code_sprint_wallscope_dave_bitter.md
Last active July 2, 2017 11:18
code_sprint_wallscope_dave_bitter

Wallscope Code Sprint | Dave Bitter

As a front-end developer (at ViriCiti) I mostly work on data driven websites/web-applications. One of the things I like to do the most is make something useful for a user out of a big amount of data. It's very rewarding to build a front-end that helps a user understand and gain new insights about this data.

As a student Communication and Multimedia design, or CMD, at the Amsterdam University of Applied Sciences simply building a front-end or data visualization is not all I do. We make user-centric designs. CMD learns you to really think about the user that is going to use your product. I like to bring this mindset to the table in data driven websites/web applications. Far to often the true power of an application doesn't come out because the front-end doesn't appeal to the user's wishes.

The code sprint at Wallscope was a perfect example of this. We could've just started making front-ends and datavis

@DaveBitter
DaveBitter / meesterproef_dave_bitter.MD
Last active June 28, 2017 12:21
meesterproef_dave_bitter

Retrospect Wallscope Project

Retrospect Dave Bitter

Dave Bitter

Dave Bitter

Features

Verinote API Class

What did I do

One of the first features I build was the ability to make calls to the Verinote API, provided by Wallscope, to process inputted text to be then be returned to the client. I build a class that we could use to keep all our data fetching in one central place which we could call in every other file.

@DaveBitter
DaveBitter / linked_data_visualization_research_dave_bitter.md
Last active June 11, 2017 11:40
Linked Data Visualization Research

Linked Data Visualization Research

Dave Bitter

All examples below our found in the collection on this website.

Top Picks

Game of Thrones discussions for every episode, visualized

Game of Thrones discussions for every episode, visualized