Skip to content

Instantly share code, notes, and snippets.

View LesnyRumcajs's full-sized avatar

Hubert LesnyRumcajs

View GitHub Profile
@LesnyRumcajs
LesnyRumcajs / cross_platform_rust.sh
Last active January 3, 2022 17:39
Script for enabling cross-compilation (to ARM) from Fedora 30
#!/bin/bash
echo '*** updating rust ***'
rustup update
rustup self update
echo '*** adding armv7 to rust target ***'
rustup target add armv7-unknown-linux-gnueabihf
echo '*** installing cross-compiling toolchain and headers ***'
mount -t cifs -o username=<USER>,uid=$(id -u),gid=$(id -g) //<IP>/home qnap_data/
@LesnyRumcajs
LesnyRumcajs / init.vim
Created March 26, 2019 19:20
neovim init file
if &compatible
set nocompatible
endif
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
@LesnyRumcajs
LesnyRumcajs / catch_wrapper.h
Last active August 10, 2017 09:06
Exception dispatcher
#ifndef CATCH_WRAPPER
#define CATCH_WRAPPER
template <class T, void (T::*FUNC)()>
class CatchWrapper {
public:
static int wrap(T* instance) {
int ret(-1);
try {
(instance->*FUNC)();