This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createPage({ title, body, tags, actions }) { /* ... */ } | |
// usage | |
createPage({ | |
title: 'Hello world!', | |
body: 'bodybodybody', | |
tags: ['onboarding'], | |
actions: [], | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createPage(title, body, tags, actions) { /* ... */ } | |
// usage | |
createPage('Hello world!', 'bodybodybody', ['onboarding'], []); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function sendNotifications() { | |
const preferences = await UserPreferencesRepository.findAll(); | |
preferences | |
.filter(isPreferenceHasAllowedNotification) | |
.forEach(NotificationModule.send); | |
} | |
function isPreferenceHasAllowedNotification(preference) { | |
return preference.hasAllowedNotification; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function sendNotifications() { | |
const preferences = await UserPreferencesRepository.findAll(); | |
preferences.forEach(preference => { | |
if (preference.hasAllowedNotification) { | |
NotificationModule.send(preference); | |
} | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function checkS10(deviceName) { | |
return deviceName.includes('Galaxy S10'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import DeviceInfo from 'react-native-device-info'; | |
async function checkS10() { | |
const deviceName = await DeviceInfo.getDeviceName(); | |
return deviceName.includes('S10'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_ _ _ | |
>(.)__ <(.)__ =(.)__ | |
(___/ (___/ (___/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🌞 Morning 27 commits █████▌░░░░░░░░░░░░░░░ 26.2% | |
🌆 Daytime 40 commits ████████▏░░░░░░░░░░░░ 38.8% | |
🌃 Evening 21 commits ████▎░░░░░░░░░░░░░░░░ 20.4% | |
🌙 Night 15 commits ███░░░░░░░░░░░░░░░░░░ 14.6% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tap "homebrew/bundle" | |
tap "homebrew/cask" | |
tap "homebrew/core" | |
tap "homebrew/services" | |
brew "nodenv" | |
brew "watchman" | |
cask "notion" | |
cask "iterm2" | |
cask "google-chrome" | |
cask "openjdk@11" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function* infiniteValue(acc = 0) { | |
yield acc; | |
yield* infiniteValue(acc + 1); | |
} | |
const iter = infiniteValue(); | |
console.log(iter.next().value); // 0 | |
console.log(iter.next().value); // 1 | |
console.log(iter.next().value); // 2 | |
console.log(iter.next().value); // 3 |