This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <chrono> | |
#include <thread> | |
#include <fstream> | |
#define PATH "/sys/class/powercap/intel-rapl:0/energy_uj" | |
int main(void) { | |
std::ifstream file(PATH); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "island.hpp" | |
#include <cassert> | |
void printIsland(Island* i) { | |
for (uint8_t y = 0; y < i->dim_y; y++) { | |
for (uint8_t x = 0; x < i->dim_x; x++) { | |
short num = i->map[std::make_pair(x, y)].num; | |
if (num > 900 && num <= 1000) | |
std::cout << "FF"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- albion online wireshark dissector.... or at least a beginning | |
-- used as ref: https://github.com/rafalfigura/AO-Radar/blob/master/AlbionRadaro/PhotonPacketHandler/PhotonPacketHandler.cs | |
-- (c) Green Sky | |
photon_protocol = Proto("Photon", "Photon Protocol") | |
peer_id = ProtoField.uint16("photon.peer_id", "peer_id", base.DEC) | |
crc_enabled = ProtoField.bool( "photon.crc_enabled", "crc_enabled") | |
command_count = ProtoField.uint8( "photon.command_count", "command_count", base.DEC) | |
time_stamp = ProtoField.int32( "photon.time_stamp", "time_stamp", base.DEC) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
intel-driver 1 | |
Memcheck:Addr1 | |
obj:/usr/lib/x86_64-linux-gnu/dri/i965_dri.so | |
} | |
{ | |
intel-driver 1 2 | |
Memcheck:Addr1 | |
fun:* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#ifdef TRACY_ENABLE | |
#include <spdlog/sinks/base_sink.h> | |
#include <tracy/Tracy.hpp> | |
namespace spdlog::sinks { | |
static uint32_t level_to_color(spdlog::level::level_enum level) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generates a .dot GraphViz | |
// license is CC0 (this means public domain in most countries) | |
std::ostream& operator<<(std::ostream& out, const std::vector<entt::organizer::vertex>& nodes) { | |
out << "digraph EnTT_organizer {\n"; | |
for (size_t i = 0; i < nodes.size(); i++) { | |
out << "n" << i << "[label=\"" << (nodes[i].name() == nullptr ? "NoName" : nodes[i].name()) << "\"];\n"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// tox save pattern for unencrypted data | |
#pragma endian little | |
#include <std/cint.pat> | |
#include <std/io.pat> | |
#include <std/sys.pat> | |
#include <std/mem.pat> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:. | |
rm ~/.config/tox/DHTnodes.json | |
for i in {0..19} | |
do | |
# inital setup client if save file does not exist | |
if [[ ! -f "tmp_udp_ngc_testnet$i.tox" ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
meta: | |
id: tox_save | |
file-extension: tox_save | |
license: CC0-1.0 | |
ks-version: 0.9 | |
endian: le | |
doc: | | |
Toxcore save file parser (wip) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
meta: | |
id: tox_save | |
license: CC0-1.0 | |
ks-version: 0.9 | |
endian: le | |
imports: | |
- /serialization/msgpack | |
doc: | | |
Toxcore save file parser (wip) |
OlderNewer