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
if (window.location.origin !== "https://www.instagram.com") { | |
window.alert( | |
"Hey! You need to be on the instagram site before you run the code. I'm taking you there now but you're going to have to run the code into the console again.", | |
); | |
window.location.href = "https://www.instagram.com"; | |
console.clear(); | |
} | |
const fetchOptions = { | |
credentials: "include", |
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
# Installing Expo & EAS CLIs | |
npm install --global expo-cli | |
npm install --global eas-cli | |
# Run app in Expo Go | |
expo start | |
# Enable EAS in project | |
eas build:configure |
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
// make sure you have @parcel/core and @parcel/config-default | |
// installed as devDependencies | |
import {Parcel} from '@parcel/core'; | |
import {spawn, ChildProcessWithoutNullStreams} from 'child_process'; | |
let bundler = new Parcel({ | |
entries: 'src/index.ts', | |
defaultConfig: '@parcel/config-default', | |
defaultTargetOptions: { distDir: `${process.cwd()}/dist` }, |
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 { BehaviorSubject } from "rxjs"; | |
namespace FirebaseService { | |
let _app: import("@firebase/app").FirebaseApp; | |
export const userId$ = new BehaviorSubject<string | undefined>(undefined); | |
/** | |
* Initialize Firebase. | |
*/ |
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 { FileInfo } from "../util/file-info"; | |
namespace FileService { | |
/** | |
* Upload file. | |
* | |
* @param {File} file - file to be uploaded | |
* @returns {string} generated word code for file | |
*/ | |
export async function upload(file: File): Promise<string> { |
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
{ | |
"arrowParens": "avoid", | |
"bracketSpacing": true, | |
"embeddedLanguageFormatting": "auto", | |
"htmlWhitespaceSensitivity": "css", | |
"insertPragma": false, | |
"jsxBracketSameLine": false, | |
"jsxSingleQuote": false, | |
"printWidth": 120, | |
"proseWrap": "always", |
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 { createBreakpoints } from "@chakra-ui/theme-tools"; | |
const fonts = { | |
body: `'Inter', sans-serif`, | |
heading: `'Inter', sans-serif`, | |
mono: `'Menlo', monospace`, | |
}; | |
const breakpoints = createBreakpoints({ | |
sm: "640px", |
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 'dart:math'; | |
import 'dart:ui'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
void main() => runApp(NearMissApp()); | |
class NearMissApp extends StatelessWidget { | |
@override |
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
### test slug API route | |
GET <http://localhost:3000/api/the> $pluralNoun is $gerund | |
### test request body API route | |
POST <http://localhost:3000/api/> | |
Content-Type: application/json | |
{ | |
"query": "the $pluralNoun is $gerund" | |
} |
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 { NextApiRequest, NextApiResponse } from "next"; | |
export default async (req: NextApiRequest, res: NextApiResponse) => { | |
const { query } = req.body as { query: string }; | |
res.send(slug); | |
} |
NewerOlder