This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
let colors = ["Red", "Orange", "Yellow", "Green", "Cyan", "Blue", "Magenta", "Purple", "White", "Black", "Grey", "Silver", "Pink", "Maroon", "Brown", "Beige", "Tan", "Peach", "Lime", "Olive", "Turquoise", "Teal", "Indigo", "Violet"]; | |
let animals = ["Alligator", "Armadillo", "Bat", "Bear", "Beaver", "Buffalo", "Cat", "Camel", "Capybara", "Chameleon", "Cheetah", "Chipmunk", "Chupacabra", "Cormorant", "Coyote", "Crow", "Dingo", "Dinosaur", "Dog", "Dolphin", "Duck", "Elephant", "Ferret", "Fox", "Frog", "Giraffe", "Grizzly", "Hedgehog", "Hippo", "Hyena", "Iguana", "Jackal", "Kangaroo", "Koala", "Kraken", "Lemur", "Leopard", "Lion", "Mink", "Monkey", "Moose", "Orangutan", "Otter", "Panda", "Penguin", "Platypus", "Pumpkin", "Python", "Quagga", "Rabbit", "Raccoon", "Rhino", "Sheep", "Shrew", "Skunk", "Squirrel", "Tiger", "Turtle", "Walrus", "Wolf", "Wolverine"]; | |
let generatePassword = function(length = 16) { | |
let charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"; | |
let ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fallback Popup code | |
let PopupFallback = function(text, type='alert', defaultText='') { | |
return new Promise((resolve, reject) => { | |
try { | |
let iframe = document.createElement('iframe'); | |
iframe.style.width = '450px'; | |
iframe.style.position = 'fixed'; | |
iframe.style.top = '20px'; | |
iframe.style.left = '50%'; | |
iframe.style.marginLeft = '-225px'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Integer to variable-length quantity (VLQ) | |
// This is partialy used by ASN.1 for OBJECT IDENTIFIERS | |
let intToVQL = function(n) { | |
// If simple form, just return (for simplecity) | |
// Next line can be removed and the results will be the same | |
if (n < 128) return new Uint8Array([n]); | |
// Initial array of bytes | |
let value = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simple AES encryption and decryption | |
// The password should be of high complexity | |
// as it is just pashed through a SHA256 before | |
// it is used to encrypt/decrypt | |
async function encrypt(message, password) { | |
let iv = window.crypto.getRandomValues(new Uint8Array(12)); | |
let alg = {name: "AES-GCM", iv: iv}; | |
let pwHash = await window.crypto.subtle.digest('SHA-256', new TextEncoder().encode(password)); | |
let key = await window.crypto.subtle.importKey('raw', pwHash, alg, false, ['encrypt']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ArgonOne RaspbianOS fan control script | |
# from https://download.argon40.com/argon1.sh | |
argon_create_file() { | |
if [ -f $1 ]; then | |
sudo rm $1 | |
fi | |
sudo touch $1 | |
sudo chmod 666 $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Console.Title v0.0.2-beta | |
* | |
* | |
* MIT License | |
* | |
* Copyright (c) 2018 Grammatopoulos Athanasios-Vasileios | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* GitInfoHub v0.0.1-beta | |
* | |
* | |
* MIT License | |
* | |
* Copyright (c) 2018 Grammatopoulos Athanasios-Vasileios | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal |