Skip to content

Instantly share code, notes, and snippets.

View Shatur's full-sized avatar
🏠
Working from home

Hennadii Chernyshchyk Shatur

🏠
Working from home
View GitHub Profile
-- =============================================================================
-- lightline to lualine theme converter
-- Author: shadman
-- License: MIT License
-- =============================================================================
-- Instructions
-- 1. Source this file in neovim with lightline installed
-- 2. execute :lua light2lualine_theme_converter('theme_name')
@bruxisma
bruxisma / CMakeLists.txt
Last active July 31, 2025 21:55
AppImage + CPack Experiment
# This isn't meant to be a fully featured implementation. It's just a small playground project.
# Use `cmake -Bbuild -S. -GNinja` to generate the project
# Then use `cmake --build build --target package` to generate a .appimage file ready to go
# This project DOES do dangerous things and tries to download the linuxdeploy tool directly.
# When this makes it into IXM, it will be expected that users have the linuxdeploy tool installed to *some* location.
# It will NOT download and execute something from the internet.
cmake_minimum_required(VERSION 3.16)
project(summon-test LANGUAGES CXX VERSION 0.1.0)
add_executable(app)
@ahamez
ahamez / double_portable_serialization.cc
Last active December 28, 2024 22:34
Portable serialization of floats using frexp and ldexpr. C++17
#include <climits>
#include <cmath>
#include <fstream>
#include <iostream>
#include <limits>
#include <utility>
#include <vector>
// IEEE 754 does not specify endianess (https://en.wikipedia.org/wiki/Endianness#Floating_point).
// So, to have a portable representation, we can "decompose" the floating-point value using frexp().
@mluparu
mluparu / CMakeSettings.json
Created June 30, 2018 23:23
CMake in Visual Studio: MinGW configuration targeting both x64 and i686
{
"configurations": [
{
"environments": [
{
"MINGW64_ROOT": "C:\\msys64\\mingw64",
"BIN_ROOT": "${env.MINGW64_ROOT}\\bin",
"FLAVOR": "x86_64-w64-mingw32",
"TOOLSET_VERSION": "7.3.0",
"INCLUDE": "${env.MINGW64_ROOT}\\include\\c++\\${env.TOOLSET_VERSION};${env.MINGW64_ROOT}\\include\\c++\\${env.TOOLSET_VERSION}\\tr1;${env.MINGW64_ROOT}\\include\\c++\\${env.TOOLSET_VERSION}\\${env.FLAVOR}",
@mildmojo
mildmojo / rotate_desktop.sh
Created June 18, 2014 06:47
Script to rotate the screen and touch devices on modern Linux desktops. Great for convertible laptops.
#!/bin/bash
#
# rotate_desktop.sh
#
# Rotates modern Linux desktop screen and input devices to match. Handy for
# convertible notebooks. Call this script from panel launchers, keyboard
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.).
#
# Using transformation matrix bits taken from:
# https://wiki.ubuntu.com/X/InputCoordinateTransformation