Use Deno to download files from the internet.
deno run --allow-net --allow-write download.ts [url] [filename]
| import React, { useCallback, useRef } from 'react'; | |
| import { | |
| Button, | |
| SafeAreaView, | |
| ScrollView, | |
| StatusBar, | |
| View, | |
| } from 'react-native'; | |
| import CameraRoll from '@react-native-community/cameraroll'; |
I hereby claim:
To claim this, I am signing this object:
| const removeEmoji = (str) => str.replace( | |
| /([\uE000-\uF8FF]|\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDDFF])|\ud83c[\udde6-\uddff]\ud83c[\udde6-\uddff]|\xF0\x9F\xA6\x84/g, | |
| '' | |
| ) | |
| .replace(/\xF0|\x9F|\x98|\x8D|\xF0|\x9F/g, ''); |
| dirUp1() { cd ../"$1"; } | |
| dirUp2() { cd ../../"$1"; } | |
| dirUp3() { cd ../../../"$1"; } | |
| dirUp4() { cd ../../../../"$1"; } | |
| dirUp5() { cd ../../../../../"$1"; } | |
| dirUp6() { cd ../../../../../../"$1"; } | |
| alias ..=dirUp1 | |
| alias ...=dirUp2 | |
| alias ....=dirUp3 |
| import axios from 'axios'; | |
| import applyConverters from 'axios-case-converter'; | |
| import { objectKeysToCamelCase } from 'utils'; | |
| export const redirectToLogin = () => { | |
| window.location.href = process.env.AUTH_URL; | |
| }; | |
| export const getAccessToken = () => | |
| (JSON.parse(window.localStorage.getItem('auth')) || {}).accessToken; |
| const glob = require('glob'); | |
| const fs = require('fs'); | |
| const files = glob.sync(process.cwd() + '/{src,config,scripts}/**/*.{js,jsx,ts,tsx}', {nodir: true}); | |
| const letterCount = files | |
| .map((file) => fs.readFileSync(file, { encoding: 'utf-8'})) | |
| .map((fileContent) => fileContent.split('')) | |
| .reduce((acc, lettersOfFile) => { | |
| lettersOfFile.forEach((letter) => { | |
| acc[letter] = acc[letter] ? acc[letter]+1 : 1; |
| onChange = (e: React.ChangeEvent) => { | |
| e.persist(); | |
| const { | |
| target: { checked, name, type, value }, | |
| } = e; | |
| if (!name && process.env.NODE_ENV === 'development') { | |
| console.warn( | |
| `Change event with value '${value}' happened for an element without name prop. This is probably by mistake.` | |
| ); |
| // @flow | |
| import type { Dispatch } from 'redux'; | |
| import { ClientRequest } from 'services/api'; | |
| import { getTeamId } from 'store/team/selectors'; | |
| import isClient from 'shared/utils/isClient'; | |
| export const ActionTypes = { | |
| ACCESS_TOKEN_REQUEST: 'auth/access-token/request', | |
| ACCESS_TOKEN_SUCCESS: 'auth/access-token/success', | |
| ACCESS_TOKEN_FAILURE: 'auth/access-token/failure', |