./esptool --port /dev/cu.SLAB_USBtoUART erase_flash
This file contains hidden or 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
std::string toString(unsigned long long n, uint8_t base) | |
{ | |
unsigned char buf[16 * sizeof(long)]; // Assumes 8-bit chars. | |
unsigned long long i = 0; | |
if (n == 0) { return "0"; }; | |
while (n > 0) { | |
buf[i++] = n % base; | |
n /= base; | |
} |
This file contains hidden or 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
#include <iostream> | |
#include <random> | |
int rand01() | |
{ | |
std::random_device rd; | |
std::mt19937 gen(rd()); | |
std::uniform_int_distribution<> dis(0, 1); | |
return dis(gen); | |
} |
Ark Crypto Arduino Step 1
ESP8266 Crypto | https://github.com/intrbiz/arduino-crypto |
#include <Crypto.h>
Install IPFS as described at https://ipfs.io/docs/install/
free dns redirect: https://www.noip.com/
- note: your hashes will be different, but the process is the same
- make the site root folder and 'index.html' from html provided below:
This file contains hidden or 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
def raw2arduino(): | |
i = open("raw.html", 'r') | |
o = open("arduino.html", 'a') | |
for line in i.readlines(): | |
o.write('client.println("') | |
o.write(line.strip("\n")) | |
o.write('");\n') | |
i.close() | |
o.close() | |
print "Done!" |
I hereby claim:
- I am sleepdefic1t on github.
- I am sleepdeficit (https://keybase.io/sleepdeficit) on keybase.
- I have a public key ASCeOrZ37AdH_Ssay4CWojsLeRGRf7unR4RnAghHFKHduQo
To claim this, I am signing this object:
This file contains hidden or 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 update() { | |
SpreadsheetApp.getActiveSheet().getRange("F6").setValue(Math.random()); | |
} | |
function getHeight(rand) { | |
try { | |
var response = UrlFetchApp.fetch("https://api.arkcoin.net/api/blocks/getHeight"); | |
if(response.getResponseCode() === 200) { | |
var json = JSON.parse(response.getContentText()); |
This file contains hidden or 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
// one-line time-update | |
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z" |