Skip to content

Instantly share code, notes, and snippets.

View mjoyce91's full-sized avatar
:octocat:
🟦 🟨

Mike Joyce mjoyce91

:octocat:
🟦 🟨
View GitHub Profile
@mjoyce91
mjoyce91 / super_bowl_squares.js
Last active February 14, 2022 13:16
Super Bowl Squares Generator
// Step 1. Go to lodash.com
// Step 2. Press F12 to open Developer Tools
// Step 3. Go to the "Console" tab
// Step 4. Copy and paste this entire gist into the console
// Step 5. Replace the value of "persons" with your list of participants
// Step 6. Press enter. A table will appear with Bengals scores going across, Rams scores going down.
// Note: If participants cannot be evenly distributed into all 100 squares, generated picks will be "pushed" to the left
// and you will end up with some empty squares.
const create = () => {
const persons = ['Mom', 'Bill', 'Mary', 'Dad', 'Grandma']
@mjoyce91
mjoyce91 / country-colors.json
Last active January 24, 2024 16:29
Colors of country flags
/*
MIT License
Copyright (c) 2024 Michael Joyce
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@mjoyce91
mjoyce91 / mining_profitability.js
Last active August 1, 2018 13:16
Cryptocurrency Mining Profitability Helper
// Set the coins you mine:
// name: coin name as it appears in whattomine API response
// command: full path of the executable you want to run for that coin
// args: array of args to be passed to the command
const config = [
{
name: 'Electroneum',
command: 'C:\\Users\\SomePath\\xmr-stak-cpu-win64-electroneum\\xmr-stak-cpu\\xmr-stak-cpu.exe',
args: ['C:\\Users\\Mike\\DownloadsSomePath\\xmr-stak-cpu-win64-electroneum\\xmr-stak-cpu\\config.txt'],
},
@mjoyce91
mjoyce91 / soil_moisture.ino
Last active September 7, 2017 03:31
Arduino Soil Moisture Check
const int VAL_PROBE = 0; // Analog pin 0
const int MOISTURE_LEVEL = 90; // the value after the LED goes ON
void setup() {
Serial.begin(9600);
}
void LedState(int state) {
digitalWrite(13, state); // connect LED to 13
}