├── public ├── favicon.ico └── vercel.svg ├── .yarnrc.yml ├── README.md ├── postcss.config.js ├── src ├── layouts │ └── main.tsx ├── pages │ ├── api │ │ ├── crypto.ts │ │ └── lookup.ts │ ├── _app.tsx │ ├── formatter.tsx │ ├── crypto.tsx │ ├── json-ts.tsx │ ├── linear.tsx │ ├── index.tsx │ └── lookup.tsx ├── components │ ├── pre.tsx │ └── back-button.tsx └── styles │ └── index.css ├── next-env.d.ts ├── .prettierrc ├── .gitignore ├── tailwind.config.js ├── tsconfig.json ├── package.json └── yarn.lock /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alii/tools/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /.yarnrc.yml: -------------------------------------------------------------------------------- 1 | nodeLinker: node-modules 2 | 3 | yarnPath: .yarn/releases/yarn-3.2.1.cjs 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tools 2 | 3 | useful developer/discord tools for the everyday 4 | 5 | [www.uwu.red](https://uwu.red) 6 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /src/layouts/main.tsx: -------------------------------------------------------------------------------- 1 | import {ReactNode} from 'react'; 2 | 3 | export default function MainLayout({children}: {children: ReactNode}) { 4 | return
{children}
; 5 | } 6 | -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/prettierrc", 3 | "singleQuote": true, 4 | "semi": true, 5 | "printWidth": 80, 6 | "trailingComma": "all", 7 | "arrowParens": "avoid", 8 | "bracketSpacing": false, 9 | "useTabs": true, 10 | "quoteProps": "consistent" 11 | } 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | .yarn/* 3 | !.yarn/releases 4 | !.yarn/plugins 5 | !.yarn/sdks 6 | /.next/ 7 | /out/ 8 | .DS_Store 9 | *.pem 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | .env.local 14 | .env.development.local 15 | .env.test.local 16 | .env.production.local 17 | .env 18 | .vercel 19 | .idea 20 | .vscode 21 | -------------------------------------------------------------------------------- /src/pages/api/crypto.ts: -------------------------------------------------------------------------------- 1 | import {NextApiRequest, NextApiResponse} from 'next'; 2 | 3 | export default async function (req: NextApiRequest, res: NextApiResponse) { 4 | await fetch( 5 | `https://min-api.cryptocompare.com/data/price?fsym=${req.query.symbol}&tsyms=USD,EUR,CNY,JPY,GBP`, 6 | ) 7 | .then(res => res.json()) 8 | .then(res.json); 9 | } 10 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | const colors = require('tailwindcss/colors'); 2 | 3 | module.exports = { 4 | content: ['./src/**/*.{ts,tsx}'], 5 | darkMode: 'media', 6 | theme: { 7 | colors: { 8 | transparent: 'transparent', 9 | current: 'currentColor', 10 | ...colors, 11 | gray: colors.neutral, 12 | }, 13 | }, 14 | variants: { 15 | extend: {}, 16 | }, 17 | plugins: [], 18 | }; 19 | -------------------------------------------------------------------------------- /src/components/pre.tsx: -------------------------------------------------------------------------------- 1 | import {DetailedHTMLProps, HTMLAttributes} from 'react'; 2 | 3 | export function Pre( 4 | props: Omit< 5 | DetailedHTMLProps, HTMLPreElement>, 6 | 'className' 7 | >, 8 | ) { 9 | return ( 10 |
14 | 	);
15 | }
16 | 


--------------------------------------------------------------------------------
/src/styles/index.css:
--------------------------------------------------------------------------------
 1 | @tailwind base;
 2 | @tailwind components;
 3 | @tailwind utilities;
 4 | 
 5 | @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap');
 6 | 
 7 | pre,
 8 | code {
 9 | 	font-family: 'JetBrains Mono', monospace;
10 | 	font-variant-ligatures: common-ligatures;
11 | }
12 | 
13 | @media (prefers-color-scheme: dark) {
14 | 	body {
15 | 		@apply bg-gray-900;
16 | 		@apply text-white;
17 | 	}
18 | }
19 | 


--------------------------------------------------------------------------------
/src/pages/api/lookup.ts:
--------------------------------------------------------------------------------
 1 | import {NextApiHandler} from 'next';
 2 | 
 3 | const handler: NextApiHandler = async (req, res) => {
 4 | 	if (!req.query.id) {
 5 | 		return res
 6 | 			.status(422)
 7 | 			.json({message: 'You must specify an id as a query param'});
 8 | 	}
 9 | 
10 | 	const user = await fetch('https://discord.com/api/v8/users/' + req.query.id, {
11 | 		headers: {
12 | 			Authorization: `Bot ${process.env.DISCORD_TOKEN}`,
13 | 		},
14 | 	}).then(res => res.json());
15 | 
16 | 	res.json(user);
17 | };
18 | 
19 | export default handler;
20 | 


--------------------------------------------------------------------------------
/src/components/back-button.tsx:
--------------------------------------------------------------------------------
 1 | import Link from 'next/link';
 2 | import React from 'react';
 3 | import {ArrowLeft} from 'react-feather';
 4 | 
 5 | export function BackButton() {
 6 | 	return (
 7 | 		
8 | 9 | 10 | 11 | 12 | 13 |
14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "noEmit": true, 10 | "esModuleInterop": true, 11 | "module": "esnext", 12 | "moduleResolution": "node", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "jsx": "preserve", 16 | "incremental": true 17 | }, 18 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], 19 | "exclude": ["node_modules"] 20 | } 21 | -------------------------------------------------------------------------------- /src/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import {AnimatePresence, motion} from 'framer-motion'; 2 | import {AppProps} from 'next/app'; 3 | import Head from 'next/head'; 4 | import '../styles/index.css'; 5 | 6 | export default function App({Component, pageProps, router}: AppProps) { 7 | return ( 8 | 9 | 10 | toolkit • uwu.red 11 | 12 | 13 | 19 | 20 | 21 | 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@alii/tools", 3 | "homepage": "https://uwu.red", 4 | "version": "1.0.0", 5 | "private": true, 6 | "scripts": { 7 | "dev": "next dev", 8 | "build": "next build", 9 | "start": "next start" 10 | }, 11 | "dependencies": { 12 | "discord-api-types": "^0.33.5", 13 | "framer-motion": "^6.3.10", 14 | "json_typegen_wasm": "^0.7.0", 15 | "next": "12.1.6", 16 | "react": "18.1.0", 17 | "react-dom": "18.1.0", 18 | "react-feather": "^2.0.10", 19 | "swr": "^1.3.0" 20 | }, 21 | "devDependencies": { 22 | "@tailwindcss/jit": "^0.1.18", 23 | "@types/node": "^17.0.40", 24 | "@types/react": "^18.0.12", 25 | "autoprefixer": "^10.4.7", 26 | "postcss": "^8.4.14", 27 | "prettier": "^2.6.2", 28 | "tailwindcss": "^3.0.24", 29 | "typescript": "^4.7.3" 30 | }, 31 | "packageManager": "yarn@3.2.1" 32 | } 33 | -------------------------------------------------------------------------------- /public/vercel.svg: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /src/pages/formatter.tsx: -------------------------------------------------------------------------------- 1 | import React, {useState} from 'react'; 2 | import {BackButton} from '../components/back-button'; 3 | import {Pre} from '../components/pre'; 4 | import MainLayout from '../layouts/main'; 5 | 6 | export default function Formatter() { 7 | const [value, setValue] = useState(''); 8 | 9 | return ( 10 | 11 | 12 | 13 |
14 |