Skip to content

Instantly share code, notes, and snippets.

View colesnicov's full-sized avatar

Colesnicov Denis Petrovich colesnicov

  • Czech Republic, Tachov
View GitHub Profile
@danielgek
danielgek / Makefile
Created June 3, 2021 19:53 — forked from ddevault/Makefile
Tiny Wayland compositor
WAYLAND_PROTOCOLS=/usr/share/wayland-protocols
# wayland-scanner is a tool which generates C headers and rigging for Wayland
# protocols, which are specified in XML. wlroots requires you to rig these up
# to your build system yourself and provide them in the include path.
xdg-shell-protocol.h:
wayland-scanner server-header \
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
xdg-shell-protocol.c: xdg-shell-protocol.h
@goncalor
goncalor / atmega328pb.markdown
Last active February 14, 2024 02:50
How to add support for ATmega328PB to avr-gcc and avrdude

Adding support for ATmega328PB to avr-gcc and avrdude

avr-gcc

  1. Download ATmega's support pack from Microchip's website
  2. Unzip the relevant files

unzip -j Atmel.ATmega_DFP.x.y.zzz.atpack \

@rsjaffe
rsjaffe / ConcurrentQueue.h
Last active June 15, 2022 13:14
Simple Blocking/Nonblocking Concurrent (thread-safe) Queue Adapter, defaulting to deque implementation, using mutexes and condition variable waits
#ifndef RSJ_CONCURRENT_QUEUE_H
#define RSJ_CONCURRENT_QUEUE_H
/*
==============================================================================
Copyright 2019 Rory Jaffe
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
@spacelatte
spacelatte / arduino-3rd-party-boards.lst
Last active May 22, 2019 08:08
list of 3rd party board urls for arduino
http://arduino.esp8266.com/stable/package_esp8266com_index.json
http://clkdiv8.com/download/package_clkdiv8_index.json
http://digistump.com/package_digistump_index.json
http://download.labs.mediatek.com/package_mtk_linkit_index.json
http://download.labs.mediatek.com/package_mtk_linkit_smart_7688_index.json
http://downloads.arduino.cc/packages/package_mkr1000_index.json
http://downloads.konekt.io/arduino/package_konekt_index.json
http://downloads.sodaq.net/package_sodaq_index.json
http://downloads.sodaq.net/package_sodaq_samd_index.json
http://drazzy.com/package_drazzy.com_index.json
@laobubu
laobubu / ABOUT.md
Last active May 7, 2024 18:37
A very simple HTTP server in C, for Unix, using fork()

Pico HTTP Server in C

This is a very simple HTTP server for Unix, using fork(). It's very easy to use

How to use

  1. include header httpd.h
  2. write your route method, handling requests.
  3. call serve_forever("12913") to start serving on port 12913
@Flix01
Flix01 / imguiverticaltext.h
Created June 23, 2016 17:23
ImDrawList methods to display vertical text in ImGui
#pragma once
#include <imgui.h>
#include <imgui_internal.h>
// ImDrawList methods to display vertical text
/*
// TEST: inside a window:
ImGuiWindow* window = ImGui::GetCurrentWindow();
ImDrawList* dl = window->DrawList;
#pragma once
#include "IconsFontAwesome.h" // from https://github.com/juliettef/IconFontCppHeaders
namespace ImGui
{
inline void SetupImGuiStyle( bool bStyleDark_, float alpha_ )
{
@hb3p8
hb3p8 / ImGuiHandler.cpp
Created January 29, 2016 08:33
ImGui OSG wrapper
#include <ImGuiHandler.hpp>
#include <imgui/imgui.h>
#include <iostream>
using namespace sf;
// This is the main rendering function that you have to implement and provide to ImGui (via setting up 'RenderDrawListsFn' in the ImGuiIO structure)
// If text or lines are blurry when integrating ImGui in your engine:
@thennequin
thennequin / ColorPicker.cpp
Created December 22, 2015 11:25
Color picker
bool ColorSelector(const char* pLabel, ImVec4& oRGBA)
{
const ImU32 c_oColorGrey = ImGui::ColorConvertFloat4ToU32(ImVec4(0.75f,0.75f,0.75f,1.f));
const ImU32 c_oColorBlack = ImGui::ColorConvertFloat4ToU32(ImVec4(0.f,0.f,0.f,1.f));
const ImU32 c_oColorBlackTransparent = ImGui::ColorConvertFloat4ToU32(ImVec4(0.f,0.f,0.f,0.f));
const ImU32 c_oColorWhite = ImGui::ColorConvertFloat4ToU32(ImVec4(1.f,1.f,1.f,1.f));
ImGui::PushID(pLabel);
bool bRet = false;
ImGuiID iID = ImGui::GetID(pLabel);
@Lanchon
Lanchon / stm32cubemx-linux.md
Last active August 4, 2023 08:54
Installing STM32CubeMX on Linux

Installing STM32CubeMX on Linux

The STM32CubeMX tool is written in portable java, but unfortunately it is distributed as a Windows executable embedded in a Windows installer.

To install it on Linux:

  1. sudo java -jar SetupSTM32CubeMX-4.11.0.exe
  2. install the tool somewhere in your home, eg: /home/you/stm32/cubemx
  3. sudo chown -R you:you /home/you/stm32/cubemx