Skip to content

Instantly share code, notes, and snippets.

View DCNick3's full-sized avatar
🥝

⭐️NINIKA⭐️ DCNick3

🥝
View GitHub Profile
@DCNick3
DCNick3 / Cargo.toml
Last active June 21, 2024 17:17
Fuzzing float values to operations where conversion to double gives different results
[package]
name = "floatfuzz"
version = "0.1.0"
edition = "2021"
[dependencies]
# version 0.17 doesn't remove the progressbars after finish_and_clear =(
indicatif = "0.16.2"
@DCNick3
DCNick3 / gist:1ea7ee5da16cb46776624eec4d464609
Last active October 2, 2021 15:57
bazel_rules_cc_toolchain_test
We couldn’t find that file to show.
@DCNick3
DCNick3 / revert.patch
Created September 28, 2021 15:06
(dirty) gdb 11.1 patch to allow using shell-like output redirection with gdbserver
diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
index 5c6191d941c..5587f8225fa 100644
--- a/gdbserver/linux-low.cc
+++ b/gdbserver/linux-low.cc
@@ -964,7 +964,7 @@ linux_process_target::create_inferior (const char *program,
{
maybe_disable_address_space_randomization restore_personality
(cs.disable_randomization);
- std::string str_program_args = construct_inferior_arguments (program_args);
+ std::string str_program_args = stringify_argv (program_args);
@DCNick3
DCNick3 / README.md
Last active June 27, 2021 19:14
Foreign C struct

PoC template-based C++20 foreign C struct projection. Allows to interact with C structures that are not necessarily layout-compatible. Can be extended to support different endianness, different types representation, custom pointers, etc

TODO: write more info

@DCNick3
DCNick3 / miiiw_setcolor.py
Created July 12, 2020 09:12
Set xiaomi gaming mouse color from linux
# requires python bindings of hidapi
import hid
path = [ x for x in hid.enumerate() if x['vendor_id'] == 0x2717 and x['product_id'] == 0x5009 and x['interface_number'] == 1 ][0]['path']
dev = hid.device()
dev.open_path(path)
"""
@DCNick3
DCNick3 / lstrbuf.c
Created February 14, 2018 13:46
StringBuffer realization for OpenComputers
/*
This is StringBuffer API for OpenComputers.
It must be compiled as part of native library (with some other patches)
by DCNick3, 2018
*/
#define lstrbuf_c