Skip to content

Instantly share code, notes, and snippets.

View sleepdefic1t's full-sized avatar

₴Ⱡ33₱ sleepdefic1t

View GitHub Profile
#include <iostream>
#include <random>
int rand01()
{
std::random_device rd;
std::mt19937 gen(rd());
std::uniform_int_distribution<> dis(0, 1);
return dis(gen);
}
@sleepdefic1t
sleepdefic1t / erase_esp8266.md
Last active January 30, 2019 08:52
Erase ESP8266

./esptool --port /dev/cu.SLAB_USBtoUART erase_flash

@sleepdefic1t
sleepdefic1t / gist:9b9a712da907123ad6122490b2198558
Created September 14, 2018 08:37
unsigned long long with base to String
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;
}
#!/usr/bin/env bash
# This file is part of Ark Cpp Client.
#
# (c) Ark Ecosystem <[email protected]>
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
# #########
# This script extends support to the Arduino IDE.
#!/usr/bin/env bash
# This file is part of Ark Cpp Client.
#
# (c) Ark Ecosystem <[email protected]>
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
# #########
# This script extends support to the Arduino IDE.
#!/usr/bin/env bash
# This file is part of Ark Cpp Crypto.
#
# (c) Ark Ecosystem <[email protected]>
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
# #########
# This script extends support to the Arduino IDE.
@sleepdefic1t
sleepdefic1t / erase_esp32.md
Created January 30, 2019 08:51
Erase ESP32