Skip to content

Instantly share code, notes, and snippets.

View TheHans255's full-sized avatar

Hans Jorgensen TheHans255

View GitHub Profile
@TheHans255
TheHans255 / inkplate_random_photo_frame.ino
Last active February 18, 2024 21:32
Arduino sketch code for Inkplate 6COLOR digital photo frame
/*
* This project is adapted from the Inkplate6COLOR_Image_Frame_From_SD example for Soldered Inkplate 6COLOR.
* (available at https://github.com/SolderedElectronics/Inkplate-Arduino-library/blob/master/examples/Inkplate6COLOR/Projects/Inkplate6COLOR_Image_Frame_From_SD/Inkplate6COLOR_Image_Frame_From_SD.ino).
*
* It is modified to display the images in a random order as opposed to a sequential order.
*/
// Next 3 lines are a precaution, you can ignore those, and the example would also work without them
#ifndef ARDUINO_INKPLATECOLOR
#error "Wrong board selection for this example, please select Soldered Inkplate 6COLOR in the boards menu."
@TheHans255
TheHans255 / publish.mjs
Last active February 7, 2023 21:09
Publishing Script for IPFS and AWS
import { exec } from "child_process"
import AWS from "aws-sdk";
import { promisify } from "util";
import { promises as fs, createReadStream } from 'fs';
import * as path from 'path';
import * as mime from 'mime-types';
/*
* Node.js script to publish website simultaneously to IPFS and AWS.
* Dependencies:
@TheHans255
TheHans255 / alias-method.js
Created August 27, 2016 19:13
An Alias Method implementation written in JavaScript
/*
An Alias Method implementation written in JavaScript
Copyright (c) 2016 Hans Jorgensen
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 furnished to do so,