Skip to content

Instantly share code, notes, and snippets.

// magic = 0x75627265
struct UbreezMessage {
uint32_t magic;
char id[12];
float CO2;
float H;
float P;
float TVOC;
float eCO2;
float t;
@labiak
labiak / strapi.store_core.plugin_content-manager_schema.js
Created December 7, 2018 00:26
plugin_content-manager_schema in store_core of strapi-based project
{
"generalSettings": {
"search": true,
"filters": true,
"bulkActions": true,
"pageEntries": 10
},
"models": {
"plugins": {
"upload": {
As I as I could see in recent years, dive more into JavaScript backend and frontend programming,
JavaScript is a simple hierarchy composition language, so it best feet for metaprogramming.
People don't like JS for dynamic typing and absence control of state and strict validation.
We have flexible type checking instrument with declarative JSON configuration - jsonschema.
Based of this instrument we can build API gateways using Swagger declarations that is extension of jsonschema.
I propose a radically different approach to changing the state of an object and I understand that it require
different way of thinking in way of transactions, not in way in integral algorythms.
Instead of a microservice, I suggest using a simpler notion - an enzyme
@labiak
labiak / swap.sh
Created February 4, 2019 16:11 — forked from kissarat/swap.sh
FILENAME=/tmp/swap-$(date +%s)
dd if=/dev/zero of=${FILENAME} bs=1M count=$1
mkswap ${FILENAME}
chmod 600 ${FILENAME}
swapon ${FILENAME}
{
"docker.attachShellCommand.linuxContainer": "/bin/bash",
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.fontSize": 13,
"editor.formatOnSave": false,
"editor.insertSpaces": true,
"editor.rulers": [100],
"editor.tabSize": 2,
"emmet.excludeLanguages": ["markdown"],