Skip to content

Instantly share code, notes, and snippets.

View danielvcorreia's full-sized avatar

Daniel Correia danielvcorreia

View GitHub Profile
@danielvcorreia
danielvcorreia / DisplayPrivateIPaddress.md
Last active March 11, 2024 16:41
Finding host IP address

MacOS

Use ipconfig command to show a specific interface:

For Wi-Fi connection

ipconfig getifaddr en0

For Wired connection

@danielvcorreia
danielvcorreia / elevatorSaga.js
Last active July 9, 2025 18:37
A bad implementation of The elevator programming game that works while struggling on some levels.
{
init: function(elevators, floors) {
const max_destinations = 2
const max_loadFactor = 0.5
for (let i = 0; i < elevators.length; i++) {
elevators[i].on("idle", function() {
for (let j = 0; j < floors.length; j++) {
floors[j].on("down_button_pressed", function() {
@danielvcorreia
danielvcorreia / diskpartFormatDisk.txt
Last active February 24, 2025 19:29
Example of how to (exFAT) format disk on windows using diskpart in a command prompt running as administrator
Notes at end of file with some extra information and safety advice.
Search in windows: 'cmd' and open command prompt as administrator.
Microsoft Windows [Version 10.0.18362.657]
(c) 2019 Microsoft Corporation. Todos os direitos reservados.
C:\WINDOWS\system32>diskpart