Code Snippets
March 13, 2021•246 words
There's no point in writing the same thing twice...
- Animated Emoji Title - Renders a series of updating emojis in a web-page's title bar
- glitch-text - A pure CSS sci-fi glitch animation
- bullet-converter.js - Converts input from plain text to makrdown
- credit-card-validator.py - Validates credit card is of the correct format
- gen-unique.ts - Generate a sudo unique ID
- click-outside.js - A Vue.js directive to close a menu when the user clicks anywhere
- json2array.js - Converts a JSON object to a key'ed array
- keep-mouse-movin.sh - Periodically moves the mouse
- react tic-tac-toe - React, TypeScript Styled-Components game of tic-tac-toe
- key-mirror.ts - Constructs an enumeration with keys the same as their value
- react-grid-system.ts - A pure CSS grid system as a React component
- respond-to-scroll-position.vue - Call a function at a certain scroll position in Vue
- sentiment-analysis-example.js - Calculate the sentiment of a given string offline
- pulsing-text.tsx - Pure CSS text animation, React, TypeScript, Styled-Components
- translations.ts - Example of using i18next within a React app, for localisation
- error-handler.ts - Wrapper to be called for implementing error logging
- media-queries.ts - Styled-Components class for reusable media queries
- typography.ts - Styled-Components reusable font/ text styles
- color-pallet.ts - Example oof TypeScript clor pallet for styled-components
- sizes.ts - Example styled-components global sizes
- NavBar.vue - Vue.js navbar component, using TypeScript, SCSS, GraphQL
- TimeSeriesChart.svelte - A multi-line time series chart, W Svelte, TS and Pancake