Skip to content

Instantly share code, notes, and snippets.

@zoff99
zoff99 / tox_127_0_0_1.diff
Created March 11, 2024 19:55
tox_127_0_0_1
diff --git a/toxcore/LAN_discovery.c b/toxcore/LAN_discovery.c
index ef44d3b55..769f7f0b7 100644
--- a/toxcore/LAN_discovery.c
+++ b/toxcore/LAN_discovery.c
@@ -153,6 +153,21 @@ static Broadcast_Info *fetch_broadcast_info(const Network *ns)
return nullptr;
}
+ IP *ip = &broadcast->ips[broadcast->count];
+ ip->family = net_family_ipv4();
@zoff99
zoff99 / ll2
Created September 29, 2023 08:18
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp/
make -j$(nproc)
cd models/
wget https://huggingface.co/TheBloke/Uncensored-Frank-13b-GGUF/resolve/main/uncensored-frank-13b.Q2_K.gguf
cd ../
# until here no big thing
##############
# now start the interactive prompt, it will use RAM and CPU (about 10 GByte RAM, and all CPU you have)!!
Replaying 'c-toxcore/testing/fuzzing/bootstrap_fuzz_test_corpus/tools-toktok-fuzzer-corpus-bootstrap_fuzzer-d1165039f4d6747b12859746366153c7e5af266d' (899 bytes): OK
Replaying 'c-toxcore/testing/fuzzing/bootstrap_fuzz_test_corpus/tools-toktok-fuzzer-corpus-bootstrap_fuzzer-d3d5fbbccefead841645e2c479161f8280b637c7' (671 bytes): OK
Replaying 'c-toxcore/testing/fuzzing/bootstrap_fuzz_test_corpus/tools-toktok-fuzzer-corpus-bootstrap_fuzzer-d42b9f8ef1b1596abfa92c6fcdfa67f2e9d17f49' (12 bytes): OK
Replaying 'c-toxcore/testing/fuzzing/bootstrap_fuzz_test_corpus/tools-toktok-fuzzer-corpus-bootstrap_fuzzer-d73a126ff33d73fdd5e56042c13c33abd062e767' (132 bytes): OK
Replaying 'c-toxcore/testing/fuzzing/bootstrap_fuzz_test_corpus/tools-toktok-fuzzer-corpus-bootstrap_fuzzer-dabe743f8cc73f360645737b7415ae7192e69cb5' (1695 bytes): OK
Replaying 'c-toxcore/testing/fuzzing/bootstrap_fuzz_test_corpus/tools-toktok-fuzzer-corpus-bootstrap_fuzzer-dce186c75529a8f45f200a3ddf9b1be22b82f872' (111 bytes): OK
Replaying 'c-toxcore/testing
#! /bin/bash
threads=5
quiet=1
function sanitize_file_name {
echo -n "$1" | perl -pe 's/[\?\[\]\/\\=<>:'"'"';,"&\$#*()|~`!{}%+]//g;' -pe 's/[\r\n\t -]+/_/g;'
}
stty -echoctl # hide ^C
We couldn’t find that file to show.
#define _GNU_SOURCE
#include <ctype.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#define _GNU_SOURCE
#include <ctype.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#! /bin/bash
nodes_url="https://nodes.tox.chat/json"
file="n.json"
latest_toxcore_version_text="1000002018"
ok_toxcore_version="1000002013 1000002014 1000002015 1000002016 1000002017"
rm -f "$file"
wget "$nodes_url" -O "$file" >/dev/null 2>&1
void gc_save_pack_group(const GC_Chat *chat, Bin_Pack *bp)
{
if (chat->numpeers == 0) {
LOGGER_ERROR(chat->log, "Failed to pack group: numpeers is 0");
return;
}
bin_pack_array(bp, 7);
// --------------------------------------
doc: |
Toxcore save file parser (wip)
Copyright https://github.com/Green-Sky
meta:
id: tox_save
license: GPL-3.0