- Go to VSCode, click CMD+Shift+P
- Enter:
Preferences: Configure User Snippets
- Choose
typescriptreact.json
- Copy the "ReactComponent" property from the
typescriptreact.json
file to your clipboard - Paste
- Enjoy
This file contains hidden or 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 axios from 'axios'; | |
import { parse } from 'ndjson'; | |
async function fetchNDJSON(url: string): Promise<void> { | |
try { | |
const response = await axios({ | |
method: 'get', | |
url: url, | |
responseType: 'stream' | |
}); |
This file contains hidden or 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
"use client" | |
import { Button } from "./ui/button" | |
import { | |
Dialog, | |
DialogContent, | |
DialogDescription, | |
DialogHeader, | |
DialogTitle, | |
DialogTrigger, |
This file contains hidden or 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
from telegram import Bot, Update | |
from telegram.ext import Updater, MessageHandler, Filters, CommandHandler | |
import boto3 | |
import logging | |
# Enable logging | |
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) | |
# AWS configurations | |
AWS_ACCESS_KEY = 'YOUR_AWS_ACCESS_KEY' |
This file contains hidden or 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 { StyleSheet, Text, View } from 'react-native'; | |
export default function App() { | |
return ( | |
<View style={styles.container}> | |
<Text>Hello World</Text> | |
</View> | |
); | |
} |
This file contains hidden or 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 { RtcTokenBuilder, RtcRole } from 'agora-access-token'; | |
const APP_ID = ''; | |
const APP_CERTIFICATE = ''; | |
export const generateRoomToken = async ({ roomKey, userUid, role, }) => { | |
if (!roomKey) { | |
throw new Error('no room name'); | |
} | |
if (typeof userUid === 'string') { | |
userUid = parseInt(userUid); |
This file contains hidden or 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' | |
function Pokemons() { | |
} | |
export default Pokemons |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.0</real> |
This file contains hidden or 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 axios from 'axios'; | |
class FootballAPI { | |
constructor() { | |
this.BASE_URL = 'http://api.football-data.org/v1'; | |
this.API_KEY = process.env.REACT_APP_FOOTBALL_API_KEY; | |
this.http = axios; | |
} | |
sendRequest(method, url, data, headers) { |
This file contains hidden or 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
(() => { | |
var json = [ | |
{ | |
id: "62-0VE218914258759", | |
name: "Versace 0VE2194", | |
price: 373, | |
final_price: 224, | |
img_front: | |
"https://static.glassesusa.com/media/catalog/product/8/0/8053672851298_f_1.jpg", | |
img_angle: |
NewerOlder