- Intro
- Our first HTTP test
- Using a database
- Using factories
- Factory relations
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
// Number with commas | |
function numberWithCommas(x: number): string { | |
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); | |
} | |
function toLocaleStringSupportsLocales(number: number | string) { | |
if (typeof number === "string") { | |
return parseFloat(number).toLocaleString(); | |
} | |
return number.toLocaleString(); |
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 { useForm, UseFormReturn, SubmitHandler } from "react-hook-form"; | |
type InputProps = React.DetailedHTMLProps< | |
React.InputHTMLAttributes<HTMLInputElement>, | |
HTMLInputElement | |
>; | |
const Input = React.forwardRef<HTMLInputElement, InputProps>((props, ref) => ( | |
<label htmlFor={props.name}> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> |
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
http://tracker2.wasabii.com.tw:6969/announce | |
http://www.wareztorrent.com:80/announce | |
udp://bt.xxx-tracker.com:2710/announce | |
udp://tracker.eddie4.nl:6969/announce | |
udp://tracker.grepler.com:6969/announce | |
udp://tracker.mg64.net:2710/announce | |
udp://wambo.club:1337/announce | |
udp://tracker.dutchtracking.com:6969/announce | |
udp://tc.animereactor.ru:8082/announce | |
udp://tracker.justseed.it:1337/announce |
S/N | OPERATOR | 7-digit Assignments | STATUS |
---|---|---|---|
1. | MIC Tanzania PLC | 071 + Y XXXXXX 065 + Y XXXXXX 067 + Y XXXXXX |
Operational |
2. | Tanzania Telecommunications Corporation | 073 + Y XXXXXX | Operational |
3. | Vodacom Tanzania PLC | 074 + Y XXXXXX 075 + Y XXXXXX 076 + Y XXXXXX |
Operational |
4. | Zanzibar Telecom PLC | 077 + Y XXXXXX | Operational |
5. | Airtel Tanzania PLC | 078 + Y XXXXXX 068 + Y XXXXXX 069 + Y XXXXXX |
Operational |
6. | Smile Communications Tanzania Limited | 066 + Y XXXXXX |
Tags: networking protocol
Quote of the Day is a simple protocol that is used to deliver daily quotes. Although its usage is almost nonexistent these days, there are still a few public servers. The protocol is defined by RFC 865. According to the RFC, a QOTD server is run on port 17 for TCP and UDP connections.
The RFC recommends that;
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
// users.test.ts | |
import axios from 'axios'; | |
import Users from '../src/users'; | |
jest.mock('axios'); | |
const mockedAxios = axios as jest.Mocked<typeof axios>; | |
let us: Users; | |
beforeAll(() => { | |
us = new Users(); |
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
const morning = { | |
breakfast: "oatmeal", | |
lunch: "peanut butter and jelly" | |
} | |
const dinner = "mac and cheese" | |
const backpackingMeals = { | |
...morning, | |
dinner | |
} |