[ Let's Talk Code ]
(click to show example code)

    • What does my code look like?

      Click a title to see...

    • [Expired To Be] [Chrome Extension *and* SPA] [GitHub] [JavaScript: IndexedDB; Chrome API; React; TypeScript]
      • A convenient Expirations Reminder
        
        // `getPopup` will render the Chrome extension's HTML, then it will load the extension's JS script file.
        //
        const getPopup = () => {
              let domApplyTo = document.getElementById('web-root') as HTMLElement;
        
        async function fetchAsync(getUrl: string) {
            let response = await fetch(getUrl, { method: 'GET' });
            let data = await response.text();
            return data;
        }
        
        const initParser = new DOMParser(),
            nowGetScript = () => {
                let popupScript = document.createElement('script');
                popupScript.src = 'extensions/chrome/popup.js';
                popupScript.async = false;                        // This is on purpose; we need this available immediately.
                domApplyTo.appendChild(popupScript);              // console.log('popup.js is here.');
            },
                                            
    • [CSS Flex: Smooth Wrapping] [Developer code for share] [CodePen (56 <3)] [JavaScript: cloneNode, arrow functions, set|clearTimeout; CSS3: flex, transition]
      • CSS Flex: Smooth Wrapping (no dependency libraries)
        
        const nodes = document.querySelectorAll('.item-node'),
              totalNodes = nodes.length,
              boxes = [], // Array and object contents are not immutable.
              node = {},
              dupe = {};
        
        let nodeCnt = 0,      // Node count: Loop through nodes[]
            resizeWaitID = 0; // setTimeout ID for window.resize()
        
        function moveNodes() {
            clearTimeout(resizeWaitID);
            resizeWaitID = setTimeout(() => {
                for (nodeCnt = 0; nodeCnt < totalNodes; nodeCnt++) {
                    boxes[nodeCnt].dupe.style.left = boxes[nodeCnt].node.offsetLeft + 'px';
                    boxes[nodeCnt].dupe.style.top = boxes[nodeCnt].node.offsetTop + 'px';
                }
            }, 101);
        }
        
        window.addEventListener('resize', moveNodes);
                                            
    • [React -from- Scratch; Fortify React and JavaScript concepts] [Developer Tool] [CodePen] [React: state, components; JavaScript: async, fetch]
      • React -from- Scratch: A 4-component project I 'used to' write out from memory.
        
        class GistBox extends React.Component {
        
            state = {
                gistList: []
            };
        
            getGist = (usernameInput) => {
                const url = `https://api.github.com/users/${usernameInput}/gists`;
        
                async function fetchAsync(getUrl) {
                    let response = await fetch(getUrl, { method: 'GET' });
                    let data = await response.json();
                    return data;
                };
        
                fetchAsync(url).then( data => {
                    var thisGist = {};
                                            

[ Let's Talk Solutions ]
(click to expand)

    • Web-App-Related Solutions

    • Pet Ref App - 20 minute conversation - A PHP- and MySQL-based web app created to facilitate onboarding at a vet clinic.
    • Expired To Be - 30 minute conversation - 2 Tech Stacks: [JavaScript] = Chrome browser extension, and [React with browser extension] = SPA
    • Training Progress SPA (and PWA) - 10 minute conversation - A decorative way to present someone's training progress leveraging JSON-driven data and CSS3 Flex transforms.