Skip to content

Instantly share code, notes, and snippets.

View acidtone's full-sized avatar

Tony Grimes acidtone

  • Southern Alberta Institute of Technology
  • Calgary
View GitHub Profile
@acidtone
acidtone / README.md
Last active August 23, 2023 06:26
Challenges: Hello Vanilla

Hello Vanilla Challenges

Challenges by spiciness

Mild

  • Move css, javascript and image files to dedicated directories.
  • Move "count is" text from counter.js to index.html.
  • Replace <img> logos with inline svg.
  • Refactor colour hex codes to hsl().
  • Change the dark mode setting of the page by changing your OS system preference.
@acidtone
acidtone / README.md
Last active September 11, 2023 05:08
Hello Vanilla web page example

Hello Vanilla

Welcome to a Hello Vanilla, a starter web app built with vanilla HTML, CSS and Javascript.

Attributions

@acidtone
acidtone / README.md
Last active March 23, 2023 19:07
JS Activity: Object Value Treasure Hunt

JS Activity: Object Value Treasure Hunt

Given the following Javascript objects, find the instructions in each file's comments and log individual values to the console using dot and bracket notation.

Related resources on MDN

Attributions

@acidtone
acidtone / README.md
Last active March 1, 2023 20:17
JS Activity: Refactor into a pure function

JS Activity: Refactor into pure functions

The following files contain code that runs in the global scope of the file on hard-coded variables. Refactor each of these files so that the code is reusable and portable using a pure function.

Pure function
A function that takes arguments as the only inputs and returns the result as its only output. Pure functions don't make any changes to variables outside of the function or store internal variables as state (aka. side-effects).

Instructions

For ONE of the .js files in this Gist, refactor the following code into a function so that it:

@acidtone
acidtone / README.md
Last active October 28, 2022 05:48
JS Activity: Object-oriented Treasure Hunt
@acidtone
acidtone / README.md
Last active February 7, 2023 18:48
JS Activity: Bug hunt - syntax errors

JS Activity: Bug hunt - syntax errors

Overview

The code in script.js has syntax errors. Hunt them down and fix them!

Instructions

  1. Run the code in script.js (see below);
  2. Check the console/terminal for errors;
  3. Find the line number of the error;
  4. Using your knowledge of js variables, fix the problems so the file runs without error.
@acidtone
acidtone / README.md
Last active October 10, 2022 22:39
VS Code: Setting up the Debugger

VS Code: Setting up the Debugger

The VS Code Debugger can be tricky to work with until you set it up. There are a lot of options but the following code will allow you to run individual files:

Instructions

  1. Open the Run and Debug panel in VS Code;
  2. Create a launch.json file if one doesn't already exist; Run and Debug menu screencap
  3. Add a "Run Current File" configuration by adding it to your launch.json file:
{
@acidtone
acidtone / flexbox-navigation-examples.markdown
Created September 28, 2022 14:55
Flexbox Navigation Examples
@acidtone
acidtone / markdown-test-page.md
Last active June 30, 2022 03:13
Markdown: Test page for extended syntax

Test Page for .md

Code Highlighting

// JavaScript goes here,
// And will be syntax-highlighted!
const message = 'Hello World';

@acidtone
acidtone / README.md
Last active June 4, 2022 01:20
Svelkit: Create from scratch

Create Skeleton Sveltkit app

Instructions heavily based on this article.

Starting from scratch

  1. Create project:
    npm init svelte@next app-name
    • Choose Skeleton App
  • Default: say no to the options (or not)