Skip to content

Instantly share code, notes, and snippets.


Alex Solomaha CyanoFresh

View GitHub Profile
CyanoFresh /
Last active Jan 13, 2020
Working ESP32 platformio on FreeBSD (fix toolchain-extensa32)

This is guide to enable support for ESP32 platformio on FreeBSD.

If you have these error messages:

Processing test32 (board: esp32dev; framework: arduino; platform: espressif32)
PackageManager: Installing toolchain-xtensa32 @ ~2.50200.0
Error: Could not find a version that satisfies the requirement '~2.50200.0' for your system 'freebsd_amd64'

then this guide is for you.

View FullyFeatured-ESP8266.ino
#include <ESP8266WiFi.h>
#include <Ticker.h>
#include <AsyncMqttClient.h>
#include "SSD1306Wire.h"
#define WIFI_SSID "//"
#define WIFI_PASSWORD "//"
#define MQTT_HOST ""
#define MQTT_PORT 1883
CyanoFresh / simple_i18n.js
Created Jan 17, 2017
JS Simple i18n key => value
View simple_i18n.js
// Array with translations
var translations = {
'first': 'Hello, {{name}}!'
function t(key, values) {
var str = translations[key];
if (!values) {
return str;
View WebhookController.php
namespace app\controllers;
use Yii;
use yii\web\BadRequestHttpException;
use yii\web\Controller;
* Class WebhookController
CyanoFresh / build_NodeMCU_firmware.bat
Last active May 1, 2017
Build nodemcu firmware on windows
View build_NodeMCU_firmware.bat
docker run --rm -it -v //c/Users/CyanoFresh/nodemcu-firmware:/opt/nodemcu-firmware marcelstoer/nodemcu-build
docker run -e "INTEGER_ONLY=1" --rm -it -v //c/Users/CyanoFresh/nodemcu-firmware:/opt/nodemcu-firmware marcelstoer/nodemcu-build
docker run -e "FLOAT_ONLY=1" --rm -it -v //c/Users/CyanoFresh/nodemcu-firmware:/opt/nodemcu-firmware marcelstoer/nodemcu-build
CyanoFresh / getSteamDeviceID.php
Last active May 15, 2019
Generate Steam DeviceID by SteamID for accepting mobile confirmations
View getSteamDeviceID.php
* Generate device id by steamid
* Usage: getDeviceID('steamid');
* @param string $steamid SHOULD BE STRING
* @return string
function getDeviceID($steamid) {
$sha1 = sha1($steamid);