Skip to content

Instantly share code, notes, and snippets.

Avatar

Yevhenii Babichenko eugene-babichenko

View GitHub Profile
@eugene-babichenko
eugene-babichenko / Makefile
Created Sep 28, 2019
Makefile for building version strings from Git data and including that version numbers into go programs
View Makefile
TAG_COMMIT := $(shell git rev-list --abbrev-commit --tags --max-count=1)
TAG := $(shell git describe --abbrev=0 --tags ${TAG_COMMIT} 2>/dev/null || true)
COMMIT := $(shell git rev-parse --short HEAD)
DATE := $(shell git log -1 --format=%cd --date=format:"%Y%m%d")
VERSION := $(TAG:v%=%)
ifneq ($(COMMIT), $(TAG_COMMIT))
VERSION := $(VERSION)-next-$(COMMIT)-$(DATE)
endif
ifeq $(VERSION,)
VERSION := $(COMMIT)-$(DATA)
View .zshrc
GOPATH=$HOME/go
GOBIN=$GOPATH/bin
PATH=$PATH:$GOBIN
source <(zpm load --install-missing --update-check)
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#ff00ff"
@eugene-babichenko
eugene-babichenko / InfluxDB_Python_Example.ipynb
Last active Jan 30, 2019
An example of using Pandas and matplotlib (wrapped with Seaborn) along with the InfluxDB driver to analyze metrics.
View InfluxDB_Python_Example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eugene-babichenko
eugene-babichenko / Makefile
Created Nov 8, 2018
Git hook to check Rust code formatting
View Makefile
init:
git config core.hooksPath .githooks
format:
cargo fmt -- --force --write-mode overwrite
View .zshrc
# generated by `thefuck --alias`
source $HOME/thefuck.sh
source $HOME/antigen.zsh
antigen use oh-my-zsh
antigen bundle cargo
antigen bundle colored-man-pages
antigen bundle docker
View init.vim
" BASIC SETTINGS BEGIN
set backspace=indent,eol,start " backspace everything
set number " enable line numbering
set noerrorbells " disable beeps
set title " show the current filename in the window title
set cursorline " highlight current line
" remove underline
hi CursorLine cterm=none
set wildmenu " visual autocomplete for commands
@eugene-babichenko
eugene-babichenko / to_flac.sh
Created Sep 10, 2016
This is a simple script to convert all your M4A, or whatever you define, to FLAC. This script acts on audio files in the current folder and all subfolders.
View to_flac.sh
find . -type f -iname "*.m4a" -print0 | while IFS= read -r -d $'\0' input_file; do ffmpeg -i "$input_file" -f flac "${input_file%.*}.flac" < /dev/null; rm "$input_file"; done
@eugene-babichenko
eugene-babichenko / CMakeLists.txt
Last active May 17, 2020
CMakeLists.txt and toolchain file for building STM32 HAL-based projects generated with STM32CubeMX with arm-none-eabi-gcc. STM32CubeMX settings. Toolchain: SW4STM32. Generate under root.
View CMakeLists.txt
set(PRJ_NAME CLion_STM_LED)
set(MCU_FAMILY STM32F1xx)
set(MCU_LINE STM32F103xB)
set(MCU_LINKER_SCRIPT STM32F103RBTx_FLASH.ld)
cmake_minimum_required(VERSION 3.6)
project(${PRJ_NAME} C ASM)
add_definitions(-D${MCU_LINE})
You can’t perform that action at this time.