Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
import { SafeAreaProvider } from 'react-native-safe-area-context'; | |
import * as AuthSession from 'expo-auth-session'; | |
import { RefreshTokenRequestConfig, TokenResponse, TokenResponseConfig } from 'expo-auth-session'; | |
import jwtDecode from 'jwt-decode'; | |
import { useEffect, useState } from 'react'; | |
import { Alert, Platform, Text, TouchableOpacity } from 'react-native'; | |
import { useAsyncStorage } from '@react-native-async-storage/async-storage'; | |
import * as React from 'react' | |
import * as WebBrowser from 'expo-web-browser'; |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
MongoDB provides a Javascript shell. But Javascript is no fun without underscore.js | |
Turned out its straight forward to use underscore.js while scripting mongodb. | |
Here are the steps. | |
1) Use underscore to write your db script file (say my_commands.js) | |
E.g: _.each(db.dbname.find().toArray(), function(itm) { ... }) |