Skip to content

Instantly share code, notes, and snippets.

View jmndao's full-sized avatar
💻
Coding ...

Jonathan Musa NDAO jmndao

💻
Coding ...
View GitHub Profile
@rijkerd
rijkerd / uploadfirebase.js
Last active August 24, 2021 20:31
Implement of file upload with customrequest using antd and firebase storage
<Upload
name="file"
// eslint-disable-next-line no-undef
customRequest={data => {
const { firebase } = this.props;
const ref = firebase
.storage()
.ref('music')
.child(`${new Date().getTime()}`);
@dschep
dschep / py-comp-to-js.md
Last active June 2, 2023 15:57
Python Comprehensions to JS

Python list & dict comprehensions translated to JavasScript

Comprehensions are a really useful feature of Python that aren't available in JavaScript (or many languages). These concepts of course can be tranlsated into using map instead. But especially the dictionaries are a bit trickier.

Lists / Arrays

>>> foobar = range(5)
>>> [x + 1 for x in foobar]
[1, 2, 3, 4, 5]