Skip to content

Instantly share code, notes, and snippets.

View congard's full-sized avatar
:octocat:

Daniel congard

:octocat:
  • Kraków, Poland
View GitHub Profile
@sekcompsci
sekcompsci / Comparison Espressif ESP MCUs.md
Created June 18, 2021 03:56 — forked from fabianoriccardi/Comparison Espressif ESP MCUs.md
Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

A minimal table to compare the Espressif's MCU families.

ESP8266 ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6
Announcement Date 2014, August 2016, September 2019, September 2020, December
@htfy96
htfy96 / static_inline_example.md
Last active April 11, 2024 14:13
static inline vs inline vs static in C++

In this article we compared different behavior of static, inline and static inline free functions in compiled binary. All the following test was done under g++ 7.1.1 on Linux amd64, ELF64.

Test sources

header.hpp

#pragma once

inline int only_inline() { return 42; }
static int only_static() { return 42; }
@natanfelles
natanfelles / theme_darcula.xml
Created June 13, 2016 14:48
gedit darcula theme
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme id="darcula" _name="Darcula" version="1.0">
<author>Sash0k</author>
<_description>Dark color scheme using IntelliJ IDEA colors</_description>
<!-- Scribe Theme Generator 1.3 -->
<!-- COLORS -->
<color name="comment_color" value="#629755"/>
@espdev
espdev / qtabwidget.css
Last active May 1, 2024 06:52
A QTabWidget Custom Stylesheet Example
QTabWidget::pane {
border: 1px solid black;
background: white;
}
QTabWidget::tab-bar:top {
top: 1px;
}
QTabWidget::tab-bar:bottom {
@engelmarkus
engelmarkus / gtkmm-example.cpp
Created May 18, 2016 22:31
Creating a window with gtkmm 3 and a glade description.
// g++ -std=c++14 -o gtkmm-example gtkmm-example.cpp `pkg-config --cflags --libs gtkmm-3.0`
#include <memory>
#include <gtkmm.h>
class MainWindow : public Gtk::ApplicationWindow {
public:
MainWindow(BaseObjectType* obj, Glib::RefPtr<Gtk::Builder> const& builder)
: Gtk::ApplicationWindow(obj)
, builder{builder}
@docapotamus
docapotamus / swappiness.md
Last active March 6, 2024 08:58
Setting swappiness on Debian

Swappiness controls the tendancy the kernel wishes to swap.

Even with free memory the kernel may swap.

100 means aggressively swap 0 means wait until the last minute to swap

To check current swappiness cat /proc/sys/vm/swappiness

@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@cdown
cdown / gist:5c5b53e1855d7812dfbc
Last active February 27, 2024 19:01
Debian chroot inside Arch
pacman -S wget # needed for debootstrap
curl -o /tmp/db.deb http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.60~bpo70+1_all.deb
mkdir /opt/debootstrap
cd /opt/debootstrap
ar x /tmp/db.deb
tar xf data.tar.gz
mkdir /opt/debian
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 8, 2024 01:34
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@fairlight1337
fairlight1337 / hsvrgb-cpp
Created June 2, 2014 07:39
Simple RGB/HSV conversion in C++
// Copyright (c) 2014, Jan Winkler <winkler@cs.uni-bremen.de>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the