Skip to content

Instantly share code, notes, and snippets.

Joshua Newell imjosh

Block or report user

Report or block imjosh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@imjosh
imjosh / shutdown.py
Created Jan 31, 2019
Raspberry Pi Safe Shutdown + Restart Switches
View shutdown.py
# Safe Shutdown/Restart Switches
# untested
shutdownPin = 5
restartPin = 15
GPIO.setup(shutdownPin, GPIO.IN)
GPIO.setup(restartPin, GPIO.IN)
shutdownStatePrev = True
@imjosh
imjosh / encodings.js
Created Jan 28, 2019
Messing around with hex and base36 character encodings
View encodings.js
/* Messing around with character encodings */
/* notes:
http://www.i18nguy.com/unicode/supplementary-test.html
https://stackoverflow.com/questions/6063148/java-unicode-where-to-find-example-n-byte-unicode-characters
https://stackoverflow.com/a/37954501/2034089
https://unicode-table.com/
*/
// Adapted from https://stackoverflow.com/a/21648161/2034089
@imjosh
imjosh / getYouTubeMp4Link.js
Created Jan 3, 2019
Get a direct MP4 link for a YouTube video
View getYouTubeMp4Link.js
View 1_portainer-with-ssl-and-admin-password.yml
version: "3.6"
services:
portainer:
image: portainer/portainer
command: --ssl --sslcert /path/to/certificate.crt --sslkey /path/to/certificate.key --admin-password-file '/path/to/password.txt'
ports:
- "9000:9000"
networks:
- portainer-net
volumes:
You can’t perform that action at this time.