Skip to content

Instantly share code, notes, and snippets.

View Dangeranger's full-sized avatar
🦊
🍵 🐕 🚴

Joshua Burke Dangeranger

🦊
🍵 🐕 🚴
View GitHub Profile
@Dangeranger
Dangeranger / vagrant-vmware-tech-preview-apple-m1-pro.md
Created September 18, 2023 22:35 — forked from sbailliez/vagrant-vmware-tech-preview-apple-m1-pro.md
Vagrant and VMWare Tech Preview 21H1 on Apple M1 Pro

Vagrant and VMWare Tech Preview 21H1 on Apple M1 Pro

UPDATE November 20, 2022: VMWare Fusion 13

VMWare Fusion 13 is now released. Read Vagrant and VMWare Fusion 13 Player on Apple M1 Pro for the latest.

Summary

This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated

@Dangeranger
Dangeranger / moveItemDebug.js
Last active August 3, 2021 23:34
An example of moving an item from one Array to another Array
let dinnerFood = ['salad', 'soup', 'casserole'];
let breakfastFood = ['omelet', 'pancakes', 'fruit'];
console.log(`From array: ${breakfastFood}`);
console.log(`To array: ${dinnerFood}`);
function moveItem(itemToMove , fromArray, toArray) {
function extractItem() {
// we know the item is in the starting array
@Dangeranger
Dangeranger / random-number-explained.js
Last active June 18, 2021 17:25
A detailed explanation of the function "randomInteger" using comments
/*
* Function randomInteger:
*
* Accepts two numbers, and returns a random integer
* between the min and max inclusive of both numbers
*
* Example Usage:
* randomInteger(1, 10) => 7
* randomInteger(1, 10) => 3
* randomInteger(1, 10) => 9
@Dangeranger
Dangeranger / deliCounter.js
Last active April 23, 2021 01:01
Deli counter example
// Deli Counter
// 1. take a ticket
// 2. check if our number is up
// 3. order from counter if ready
// 4. change the deli inventory on order
// 5. receive our order, from the counter
// 6. pay for the order
// 7. leave if paid
const readline = require("readline");
@Dangeranger
Dangeranger / cakeMaker-starter.js
Created April 20, 2021 22:49
Some starter code for the cakeMaker lab. Please finish me.
let cakesToMake = [
{ flavor: "Chocolate", icing: "Peanut Butter", decoration: "Sprinkles" },
{ flavor: "Vanilla", icing: "Lime", decoration: "Coconut" },
{ flavor: "Strawberry", icing: "Vanilla", decoration: "Fruit" },
];
let cakeList = [
["Chocolate", "Peanut Butter", "Sprinkles"],
["Vanilla", "Lime", "Coconut"],
["Strawberry", "Vanilla", "Fruit"],
@Dangeranger
Dangeranger / index.starter.js
Created April 8, 2021 23:48
Helper files for Guess the Number
const readline = require('readline');
const rl = readline.createInterface(process.stdin, process.stdout);
function ask(questionText) {
return new Promise((resolve, reject) => {
rl.question(questionText, resolve);
});
}
start();
@Dangeranger
Dangeranger / sleeper.js
Last active November 4, 2020 02:17
Code example from class on 2020-11-03, for showing objects from classes working together
class Room {
constructor() {
console.log('making the room');
this.secretItem = { note: 'in the dresser' };
this.key = 'painting hall piece';
}
look(awareness) {
console.log('as you look around the room.....');
console.log({ awareness });
@Dangeranger
Dangeranger / node.js.yml
Created July 31, 2020 15:28
The corrected workflow file for step.12 of the Github learning lab
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
@Dangeranger
Dangeranger / botium-heroku-build-errors.txt
Created August 16, 2019 16:31
Output of the Heroku build process following using the "Deploy to Heroku" button
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_ENV=production
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
-----> Installing binaries
@Dangeranger
Dangeranger / vtCountyPolygons.js
Created July 19, 2019 15:11
GeoJSON which represents all the county borders in Vermont.
let countyData = {"type":"FeatureCollection", "features": [
{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-71.89930556685702,45.007967038225665],[-71.90639495793083,44.972034737155035],[-71.91256962807861,44.941586303684424],[-71.92014649911405,44.901534959428105],[-71.88768224564625,44.88414402607262],[-71.87785847130161,44.87877145078154],[-71.89809815971485,44.85887096608518],[-71.91995085333807,44.83690375089462],[-71.92931744591431,44.82964832537888],[-71.93683910186412,44.822541420493785],[-71.97482609720078,44.78724062557453],[-71.93929273719223,44.76945013143421],[-71.95140936345551,44.757495286499],[-71.9750836685309,44.734647555007385],[-71.99123898495328,44.71882667502445],[-71.9995389566063,44.711086418730154],[-72.01145503900082,44.698841717258844],[-72.05216258622916,44.718994083231216],[-72.08972446262909,44.73767356435365],[-72.11436109432913,44.74982120146015],[-72.11197436534691,44.74320799587801],[-72.10194093000278,44.71773911466352],[-72.08929717635908,44.68509008796579]