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
@Flix01
Flix01 / totp.c
Last active May 22, 2024 19:38 — forked from syzdek/totp.c
totp.c
// Original code: https://gist.github.com/syzdek/eba233ca33e1b5a45a99
// Original code license:
/*
* TOTP: Time-Based One-Time Password Algorithm
* Copyright (c) 2015, David M. Syzdek <[email protected]>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
@hmidani-abdelilah
hmidani-abdelilah / wayland-gnome-ubuntu-mint.sh
Created September 11, 2022 21:29 — forked from wellington1993/wayland-gnome-ubuntu-mint.sh
How to Install Wayland Gnome on Linux Mint Ubuntu with Dependencies with PPA
#!/bin/bash
# NOTICE, EASY WAY FIRST: sudo apt install gnome-session-wayland
# If easy way not work try this below:
################# 0 - Preparation ##################
# Update and PPA
sudo add-apt-repository -y ppa:wayland.admin/daily-builds; \
apt update; \
#
# Depends
sudo apt install -y doxygen xmlto; \
@h4k1m0u
h4k1m0u / NanoVG-example.cpp
Last active March 19, 2025 08:03
Rendering basic shapes with OpenGL using NanoVG
// file: src/main.cpp
#include <iostream>
#include "glad/glad.h"
#include "window.hpp"
#include "nanovg.h"
#define NANOVG_GL3_IMPLEMENTATION
#include "nanovg_gl.h"
@moebiussurfing
moebiussurfing / ImGuiDockspaceExample.cpp
Created July 29, 2021 05:43 — forked from AidanSun05/ImGuiDockspaceExample.cpp
A modified DockSpace example for Dear ImGui. Changes are listed at the top of the file.
// CHANGES MADE:
// Added more clarifying comments inside the function.
// Removed MSVC warning C6011 - null pointer dereference.
// Fixed a slight grammar error - "This demo app only demonstrate" => "This demo app only demonstrates"
// Demonstrate using DockSpace() to create an explicit docking node within an existing window.
// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking!
// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking.
// - Drag from window menu button (upper-left button) to undock an entire node (all windows).
// About dockspaces:
@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
@JeffM2501
JeffM2501 / imgui_docking_exmaple.cpp
Created April 21, 2021 15:14
Example of how to do editor style docking in ImGui for raylib
/*******************************************************************************************
*
* raylib [core] example - Third Person Orbit Camera Example
*
* Welcome to raylib!
*
* To test examples, just press F6 and execute raylib_compile_execute script
* Note that compiled executable is placed in the same folder as .c file
*
* You can find all basic examples on C:\raylib\raylib\examples folder or
@sepfy
sepfy / monitor.c
Created February 14, 2021 14:00
libwpa_client monitor example
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <dirent.h>
#include <sys/time.h>
#include <wpa_ctrl.h>
#define CTRL_INTERFACE_DIR "/var/run/wpa_supplicant/wlan0"
int main(int argc, char *argv[]) {
@goncalor
goncalor / atmega328pb.markdown
Last active April 24, 2025 12:04
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