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
@colesnicov
colesnicov / queue.js
Created October 11, 2022 20:37
javascript implementation of queue with extended functionality
/*
* The MIT License
*
* Copyright 2022 denis.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@colesnicov
colesnicov / newPager.js
Last active September 25, 2022 18:13
HTML Paginator in pure JS
/*
The MIT License
Copyright 2022 Denis Colesnicov.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@colesnicov
colesnicov / CMakeLists.txt
Created April 18, 2022 16:09
Jak vkladat Kconfig soubory
set(ENV{PROJ_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
@colesnicov
colesnicov / gist:e1a49409d92ae013a6b2bcf6580ccaea
Last active December 23, 2020 12:49
How to program AVR devices. Terminal commands...
Priklad: avrdude -v -p<MCU> -c<PROGRAMMER> -P<PORT> -b<BITRATE> -Uflash:w:<FILE>:i
Priklad pro programovani ATMEGA328P s pomoci arduino jako ISP programator.
MCU=atmega328p
PROGRAMMER=STK500v1 (aka arduino as ISP)
PORT=/dev/ttyUSB0
BITRATE=19200
avrdude -v -patmega328p -cstk500v1 -P/dev/ttyUSB0 -b19200 -Uflash:w:<file.hex>:i
@colesnicov
colesnicov / atmega328pb.markdown
Created December 6, 2020 13:52 — forked from goncalor/atmega328pb.markdown
How to add support for ATmega328PB to arv-gcc and avrdude

Adding support for ATmega328PB to arv-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 \

@colesnicov
colesnicov / pgm.hpp
Created January 12, 2020 20:03
With these functions, any data can be cleaned from the PGM space.
/**
* @licence WTFPL
*
*/
#pragma once
#include "avr/pgmspace.h"
template<typename T> void PROGMEM_readAnything(const T * source, T& dest)
@colesnicov
colesnicov / ftoa.c
Last active September 22, 2023 11:25
Float to string conversion for AVR's devices and over embedded MCU's..
/**
* @Licence WTFPL
*/
#include "ftoa.h"
int ftoa(float f, char *p, uint8_t precision)
{
typedef union
@colesnicov
colesnicov / TemplateEngine.cpp
Last active September 22, 2019 16:11
TemplateEngine is a system for implementing dynamic templates in real time. Fields of application: Web (processing HTML, CSS and JS file) or any other application where it is necessary to replace the keys in the text or insert into it other blocks of text. Constructions are supported text replacement (replace) or inserting another (include).
/**
* TemplateEngine.cpp
* This file is a part of The TemplateEngine system.
*
* Author: Denis Colesnicov <eugustus@gmail.com>
* Copyright: 09.2019
* Licence: MIT
*
*/
@colesnicov
colesnicov / responsive.css
Created September 16, 2019 14:24
Skeleton for responsible CSS...
/**
* Skeleton pro responzivni vzhled HTML stranek.
* Zakladni konstrukce @Media-Rule pro realizaci
* responsivnich HTML stranek
*
* @file responsive.css
* @author Denis Colesnicov <eugustus@gmail.com>
@licence MIT
* @version 1
*/