Skip to content

Instantly share code, notes, and snippets.

View Kraust's full-sized avatar

Kraust Kraust

View GitHub Profile
@amir-saniyan
amir-saniyan / Using find_package with ExternalProject in CMake.cmake
Last active March 8, 2025 21:06
This gist shows how to use find_package with ExternalProject and ExternalProject_add in CMake.
# --------------------------------------------------
function (build_external_project target file_name)
set(CMAKELIST_CONTENT "
cmake_minimum_required(VERSION ${CMAKE_MINIMUM_REQUIRED_VERSION})
project(build_external_project)
file(MD5 \"${file_name}\" FILE_HASH)
@malakudi
malakudi / gist:b90fe4c5b7ca6182fda07ed51e8eaaa5
Last active September 13, 2023 20:09
Build debian kernel package from git
git clone -b sid --single-branch https://salsa.debian.org/kernel-team/linux.git
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.2.9.tar.xz
cd linux/
edit file linux/debian/config/defines and change debug-info to false
edit file linux/debian/config/amd64/defines and change debug-info to false
debian/bin/genorig.py ../linux-5.2.9.tar.xz # create original source tar package)
debian/rules orig # unpack original source
debian/rules debian/control # create control file
fakeroot debian/rules source
fakeroot make -j24 -f debian/rules.gen binary-arch_amd64_none_amd64
@joeharr4
joeharr4 / ssh-cipher-benchmark.sh
Last active April 30, 2025 02:32 — forked from dlenski/ssh-cipher-benchmark.sh
Check speed of ssh cipher(s) on your system
#!/bin/bash
# ssh-cipher-benchmark.sh - Assesses speed of SSH encryption between specific hosts.
# Usage:
# ssh-cipher-benchmark.sh <remotehost> [ciphers]
# Default ciphers: all we can find...
#
# Note: In some cases, the first cipher tested runs faster than the others, regardless of order.
# Cause of this is not known, but changing the order of testing shows it to be true. Run the
# first one twice if you suspect this. Perhaps it is due to buffering?
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active October 31, 2025 20:47
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname