Skip to content

Instantly share code, notes, and snippets.

View jimf99's full-sized avatar

JimFyyc jimf99

  • -na-
  • YYC = Calgary Alberta Canada airport code
View GitHub Profile

Keybase proof

I hereby claim:

  • I am jimfrem99 on github.
  • I am jimfyyca (https://keybase.io/jimfyyca) on keybase.
  • I have a public key whose fingerprint is FDE2 0DF4 3E9A 00A7 84FD 5CF2 D4D5 3BCE 3A03 F93D

To claim this, I am signing this object:

@jimf99
jimf99 / index.html
Created August 2, 2018 16:28
Morse Code Trainer
<div id="bleep"></div>
<div id="text"></div>
<div id="code"></div>
<div id="beep"></div>
@jimf99
jimf99 / maidenhead.py
Created June 13, 2023 20:24 — forked from laemmy/maidenhead.py
Convert latitude and longitude to Maidenhead grid locators.
# -*- coding: utf-8 -*-
import sys
# Convert latitude and longitude to Maidenhead grid locators.
#
# Arguments are in signed decimal latitude and longitude. For example,
# the location of my QTH Palo Alto, CA is: 37.429167, -122.138056 or
# in degrees, minutes, and seconds: 37° 24' 49" N 122° 6' 26" W
#
@jimf99
jimf99 / gamepad-simulator-demo.markdown
Created August 4, 2023 19:23
Gamepad Simulator Demo

Gamepad Simulator Demo

This snippet showcases the gamepad simulator code.

The demo reads the standard values of the gamepad (using navigator.getGamepads() and reading the Gamepad interface) without needing a physical game controller connected to the computer/browser.

It uses instead a virtual gamepad generated with gamepad-simulator (more info on GitHub), which triggers the gamepad events and simulates the getGamepads navigator function.

A Pen by Alvaro Montoro on CodePen.

@jimf99
jimf99 / digital-clock-in-javascript.markdown
Created September 23, 2023 18:33
Digital Clock In JavaScript
@jimf99
jimf99 / client.js
Created October 26, 2023 14:13 — forked from aerrity/client.js
Node, Express & MongoDB: Button click example
console.log('Client-side code running');
const button = document.getElementById('myButton');
button.addEventListener('click', function(e) {
console.log('button was clicked');
fetch('/clicked', {method: 'POST'})
.then(function(response) {
if(response.ok) {
console.log('click was recorded');
@jimf99
jimf99 / SampleGuidance.ino
Created May 28, 2024 05:14 — forked from hugodahl/SampleGuidance.ino
Idea on Guidance for HugoBot in Arduino (semi-pseudo code)
#include "MeMegaPi.h"
#include "Arduino.h"
#include "SoftwareSerial.h"
// Define the pins/outputs that map to the individual motors
#define WHEEL_LF = PORT2B // Set to the pin for LEFT FRONT wheel
#define WHEEL_RF = PORT1A // Set to the pin for RIGHT FRONT wheel
#define WHEEL_LR = PORT2A // Set to the pin for LEFT REAR wheel
#define WHEEL_RR = PORT1B // Set to the pin for RIGHT REAR wheel