Skip to content

Instantly share code, notes, and snippets.

🎓
Studying

Alex Solomaha CyanoFresh

🎓
Studying
Block or report user

Report or block CyanoFresh

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
@CyanoFresh
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
<?php
namespace app\controllers;
use Yii;
use yii\web\BadRequestHttpException;
use yii\web\Controller;
/**
* Class WebhookController
@CyanoFresh
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
CyanoFresh / getSteamDeviceID.php
Last active May 15, 2019
Generate Steam DeviceID by SteamID for accepting mobile confirmations
View getSteamDeviceID.php
<?php
/**
* Generate device id by steamid
* Usage: getDeviceID('steamid');
*
* @param string $steamid SHOULD BE STRING
* @return string
*/
function getDeviceID($steamid) {
$sha1 = sha1($steamid);
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 "test.mosquitto.org"
#define MQTT_PORT 1883
You can’t perform that action at this time.