Skip to content

Instantly share code, notes, and snippets.

View VladVanyuk's full-sized avatar
🎯
Doing so much, for so long, with so little

Vladislav Vanyuk VladVanyuk

🎯
Doing so much, for so long, with so little
View GitHub Profile
@DuePonto
DuePonto / tasks.json
Created December 8, 2023 09:37
tasks.json file to Init and Build stm32 project via CMake with ninja
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "cmake init",
"command": "cmake -S ${workspaceFolder} -B ${workspaceFolder}/build -G Ninja",
"options": {
"cwd": "${workspaceFolder}",
},
@wllmsash
wllmsash / assigning-static-ip-addresses-in-wsl2.md
Last active November 12, 2025 14:48
Assigning Static IP Addresses in WSL2

Assigning Static IP Addresses in WSL2

WSL2 uses Hyper-V for networking. The WSL2 network settings are ephemeral and configured on demand when any WSL2 instance is first started in a Windows session. The configuration is reset on each Windows restart and the IP addresses change each time. The Windows host creates a hidden switch named "WSL" and a network adapter named "WSL" (appears as "vEthernet (WSL)" in the "Network Connections" panel). The Ubuntu instance creates a corresponding network interface named "eth0".

Assigning static IP addresses to the network interfaces on the Windows host or the WSL2 Ubuntu instance enables support for the following scenarios:

@baqwas
baqwas / Son_laLumi_re2.ino
Created May 28, 2020 21:08
NodeMCU to WS2813 using FastLED
/*
* SoundDetection.ino
* An introductory example to process data from a sound sensor using NodeMCU ESP8266 12E
*
* 2020-05-20 armw v0.1 initial DRAFT
*
* Operations:
* The WS2813 is a 3-wire chipset that combines the LED and its controller in a single
* package.
*
@sophec
sophec / build-linaro-macos.sh
Last active November 7, 2024 20:26
Build the Linaro arm-linux-gnueaibhf-gcc toolchain on macOS.
#! /bin/bash
# source for most of this information: https://stackoverflow.com/a/58852167/2712525
set -e
error() {
echo "failed!"
exit 1
}
@dapperfu
dapperfu / gist:b00d91845ebd77f2a403842ab3d4c614
Created September 4, 2019 13:29
Passing a (const char *) in ctypes.
dll = canape.dll
hdl = canape.handle
directory = ctypes.create_string_buffer(b"", 256)
size = ctypes.c_ulong()
# Asap3GetProjectDirectory
dll.Asap3GetProjectDirectory.argtypes=(TAsap3Hdl, ctypes.POINTER(type(directory)), ctypes.POINTER(ctypes.c_ulong))
dll.Asap3GetProjectDirectory.restype=ctypes.c_bool
result = dll.Asap3GetProjectDirectory(
hdl,
@ivakyb
ivakyb / Build Linaro toolchain for Mac.md
Last active January 24, 2024 22:19
Build Linaro toolchain for Mac

Build Linaro for Mac

1. Prepare env


Abe requires Bash version 4+.

brew install bash autogen dejagnu coreutils gcc gawk #binutils
#brew install libmpc gmp mpf
enum {
PIN_INPUT,
PIN_INPUT_HIGH,
PIN_INPUT_LOW,
PIN_OUTPUT,
PIN_OUTPUT_HIGH,
PIN_OUTPUT_LOW
}
#ifdef __AVR__
@ItKindaWorks
ItKindaWorks / dustSensorDemo.ino
Created July 19, 2018 00:49
Demo code for using a waveshare/sharp dust sensor with an ESP8266
/*
dustSensorDemo.ino
Copyright (c) 2018 ItKindaWorks All right reserved.
github.com/ItKindaWorks
dustSensorDemo.ino is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
@RealOrangeOne
RealOrangeOne / README.md
Last active December 7, 2024 23:50
Trello JSON parser

Trello Parser

Download

Open a terminal, run this:

sudo curl https://gist.githubusercontent.com/RealOrangeOne/c35751ee794e90df512bdfba6f22574d/raw/trello-parser.py -o /usr/bin/trelloparse && sudo chmod +x /usr/bin/trelloparse

Usage

$ trelloparse -h

usage: tp [-h] input output

@jamesabruce
jamesabruce / ESP_RELAY_MQTT.ino
Created February 12, 2016 10:40
Simple MQTT controlled relay running on NodeMCU dev board on pin d2/gpio4
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <PubSubClient.h>
#define RELAY 4 // pin labelled d2
// Update these with values suitable for your network.
const char* ssid = "YOURWIFI";