Skip to content

Instantly share code, notes, and snippets.

View JimGray9999's full-sized avatar
πŸ‘¨β€πŸ’»

Jim Gray JimGray9999

πŸ‘¨β€πŸ’»
View GitHub Profile
@JimGray9999
JimGray9999 / yakcoin.py
Last active February 9, 2022 01:25 — forked from aunyks/snakecoin.py
import hashlib as hasher
import datetime as date
# Define what a Yakcoin block is
class Block:
def __init__(self, index, timestamp, data, previous_hash):
self.index = index
self.timestamp = timestamp
self.data = data
self.previous_hash = previous_hash
@JimGray9999
JimGray9999 / KtoC.js
Last active November 21, 2017 02:55
How to convert to Fahrenheit from Kelvin
const kelvin = prompt('What is the Kelvin temperature today?');
// check if input is a number
// NaN = Not-A-Number
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN
if (!isNaN(kelvin)) {
var celsius = kelvin - 273; // Kelvin - 273 = Celsius