Skip to content

Instantly share code, notes, and snippets.

View 1Marc's full-sized avatar

Marc Grabanski 1Marc

View GitHub Profile
@1Marc
1Marc / reactive.js
Last active November 7, 2024 21:27
Vanilla Reactive System
// Credit Ryan Carniato https://frontendmasters.com/courses/reactivity-solidjs/
let context = [];
export function untrack(fn) {
const prevContext = context;
context = [];
const res = fn();
context = prevContext;
return res;
@1Marc
1Marc / setup-repo.md
Last active April 11, 2023 16:11
Setup Repo and Web Server
let positions = [1, 2, 3, 4, 5, 6, 7, 8, 9];
const player = "X";
const computer = "O";
let count = 1;
let currentTurn = player;
let winner;
//Dom Elements
let grid = document.createElement("div");
grid.style.width = "200px";
grid.style.display = "flex";
@1Marc
1Marc / change-audio.js
Last active July 25, 2020 20:24
Change Audio
function gotDevices(deviceInfos) {
changeAudioDestination(deviceInfos[1]) // whatever device
}
function changeAudioDestination(audioInput) {
attachSinkId(document.getElementsByTagName('video')[0], audioInput);
}
function attachSinkId(element, sinkId) {
if (typeof element.sinkId !== 'undefined') {
@1Marc
1Marc / ReactNativePrep.md
Last active March 6, 2020 12:49
React Native preparation

Preparing for the React Native Workshop:

Depending on your hardware and target platform, it may take quite a bit of time to set up your development environment for React Native. We really want to optimise the workshop time with as much content as possible, which is why we ask you to set up your development environment before the day to ensure you have the best possible experience!

Now you'll have to make some decisions on how you'd like to build your app:

  • Expo or plain React Native
  • run on physical device or on an emulator / simulator
  • Android or iOS (your app will run on both, but you don't need to set up both for the workshop)

We will support both Expo and plain React Native for this workshop, which means you can choose.

@1Marc
1Marc / setup-containers.md
Created December 12, 2019 06:19
Setup Instructions for Complete Intro to Containers

Getting Set Up

For Everyone

Install Visual Studio Code. For one section of the course I'll go some of how VSCode and containers work well together. The rest of the course you can use whatever editor you want.

For macOS and Linux

Please make sure you have the following things installed and ready to go!

@1Marc
1Marc / FullStackv2.yml
Created October 3, 2019 15:13
Full Stack Description
Slug: full-stack-v2
Title: Full Stack for Front-End Engineers, v2
Subtitle: Spend Two Full Days Immersed in Developer Operations with Jem Young
Teachers:
- young
Excerpt:
In this 2-day workshop, learn the skills needed to work across the stack and
build a web application from start to finish.
Day 1
9:30AM
Introduction
9:45AM
What does "Full Stack" mean
10:00AM
How does the internet work
10:30AM
Command line basics
@1Marc
1Marc / digging-into-node.md
Last active January 19, 2024 04:07
Digging Into Node.js Setup

Setup

Make sure you have Node 11+ installed.

Type node -v in your command line to check your version.

Install sqlite3: npm install sqlite3

For Windows

@1Marc
1Marc / python-setup.md
Last active March 19, 2019 14:47
Intro to Python Installation Instructions

Installing the prereqs for Linux and Mac should be quick, but it'll take more time for Windows users, as they'll have to install wsl and download a few additional packages.

For Linux / Mac: