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
console.log(JSON.stringify({ filter }, null, 4)); | |
const start = new Date().getTime(); | |
const end = new Date().getTime(); | |
const time = end - start; | |
console.log({ | |
inLength: filteredChatrooms.length, | |
filterTime: time, |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> //Header file for sleep(). man 3 sleep for details. | |
#include <pthread.h> | |
// A normal C function that is executed as a thread | |
// when its name is specified in pthread_create() | |
void *myThreadFun(void *vargp) | |
{ | |
sleep(4); |
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
-='cd -' | |
...=../.. | |
....=../../.. | |
.....=../../../.. | |
......=../../../../.. | |
1='cd -' | |
2='cd -2' | |
3='cd -3' | |
4='cd -4' | |
5='cd -5' |
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
{ | |
"eslint.options": { | |
"rules": { | |
"prettier/prettier": [ | |
"error", | |
{ | |
"endOfLine": "auto" | |
} | |
] | |
} |
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
// Mobile: React Native | |
import React, {useState, useEffect} from 'react'; | |
import { View } from 'react-native'; | |
import {Button} from 'react-native-paper'; | |
import { WebView } from 'react-native-webview'; | |
const App = () => { | |
const [show, setShow] = useState({isOpen: false, url: null}); |
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
// Web: React | |
import { auth } from "./config/firebase"; | |
auth.onAuthStateChanged((user) => { | |
if (user) { | |
user.getIdToken(true).then((idToken) => { | |
// This is where to call the API | |
const requestOptions = { |
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
// Backend: Node - Express | |
const express = require("express"); | |
const admin = require("firebase-admin"); | |
// Setup firebase admin [HERE] | |
// Route that handles GET request | |
app.post("/verify-token", (req, res) => { |
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
// Web: React | |
import { auth } from "./config/firebase"; | |
auth.onAuthStateChanged((user) => { | |
if (user) { | |
user.getIdToken(true).then((idToken) => { | |
// This is where to call the API | |
const requestOptions = { |
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
// Mobile: React Native | |
import React, {useState, useEffect} from 'react'; | |
import { View } from 'react-native'; | |
import {Button} from 'react-native-paper'; | |
import { WebView } from 'react-native-webview'; | |
const App = () => { | |
const [show, setShow] = useState({isOpen: false, url: null}); |
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 React from 'react'; | |
import {SafeAreaView, StatusBar} from 'react-native'; | |
import {WebView} from 'react-native-webview'; | |
const App = () => { | |
return ( | |
<> | |
<StatusBar barStyle="dark-content" /> | |
<SafeAreaView style={{flex: 1}}> | |
<WebView source={{uri: 'https://medium.com/'}} /> |