This is a very simple HTTP server for Unix, using fork(). It's very easy to use
- include header
httpd.h
- write your route method, handling requests.
- call
serve_forever("12913")
to start serving on port 12913
uniform vec4 u_gradient_color_1;//#fa67ba | |
uniform vec4 u_gradient_color_2;//#b17ff5 | |
uniform float u_gradient_alpha_color_1;//0:1:0.53 | |
uniform float u_gradient_alpha_color_2;//0:1:1.00 | |
uniform float u_gradient_location_color_1;//0:1:0.00 | |
uniform float u_gradient_location_color_2;//0:1:0.96 | |
vec4 LinearVertGradient(float yCoord, vec4 color_1, float alpha_color_1, float location_color_1, vec4 color_2, float alpha_color_2, float location_color_2) { |
#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_ ) | |
{ |
#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: |
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); |
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:
sudo java -jar SetupSTM32CubeMX-4.11.0.exe
/home/you/stm32/cubemx
sudo chown -R you:you /home/you/stm32/cubemx
Ini::IniConfig& m_oIniConfig; | |
Ini::CategoryValueMap& mCategories = m_oIniConfig.GetCategories(); | |
if (ImGui::Button("Reload")) | |
{ | |
m_oIniConfig.Load("Config.ini", true, false); | |
} | |
ImGui::SameLine(); | |
if (ImGui::Button("Save")) |
%.hex: %.asm | |
avra -fI $< | |
rm *.eep.hex *.obj *.cof | |
all: $(patsubst %.asm,%.hex,$(wildcard *.asm)) | |
upload: ${program}.hex | |
avrdude -c arduino -p m328p -P /dev/arduino-uno -b 115200 -U flash:w:$< | |
monitor: |
#!/bin/bash -e | |
# /usr/local/sbin/raspi-monitor | |
# Script to enable and disable the HDMI signal of the Raspberry PI | |
# Inspiration: http://www.raspberrypi.org/forums/viewtopic.php?t=16472&p=176258 | |
CMD="$1" | |
function on { | |
/opt/vc/bin/tvservice --preferred |