Skip to content

Instantly share code, notes, and snippets.

View ilqvya's full-sized avatar
🚣

Illia ilqvya

🚣
View GitHub Profile
@klmr
klmr / make_array.hpp
Last active March 18, 2024 07:14
C++11 make_array function template
template <typename... T>
constexpr auto make_array(T&&... values) ->
std::array<
typename std::decay<
typename std::common_type<T...>::type>::type,
sizeof...(T)> {
return {std::forward<T>(values)...};
}
@andrewkroh
andrewkroh / rpmrebuild.sh
Last active December 9, 2020 22:26
Changing RPM Version and Release with rpmrebuild
yum install rpmrebuild -y
mkdir output
# If your RPMs do not contain all of the tags defined in this preamble
# then use the --change-spec-preamble flag to modify the preamble.
cat /usr/lib/rpmrebuild/rpmrebuild_rpmqf.src
# Change the RPM's release number to 2. Ignore Distribution and URL.
rpmrebuild -p --notest-install \
@mdo
mdo / 00-intro.md
Last active November 15, 2024 14:13
Instructions for how to affix an Ikea Gerton table top to the Ikea Bekant sit-stand desk frame.

Ikea Bekant standing desk with Gerton table top

@knightsc
knightsc / inject.c
Last active May 21, 2024 15:22
An example of how to inject code to call dlopen and load a dylib into a remote mach task. Tested on 10.13.6 and 10.14.3
#include <dlfcn.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <mach/mach.h>
#include <mach/error.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/sysctl.h>
#include <sys/mman.h>