Skip to content

Instantly share code, notes, and snippets.

View Jihadist's full-sized avatar

Anton Jihadist

  • Cyberprotect
  • Moscow
View GitHub Profile
@anatoly-spb
anatoly-spb / pretty_thread_logger.h
Last active April 26, 2023 06:58
Pretty Thread Logger
/*
* Pretty thread logger
*
* Copyright (C) 2020 Anatoly Shirokov.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@madebr
madebr / CMakeLists.txt
Last active August 19, 2023 20:10
Simple CTest coverage project + script
cmake_minimum_required(VERSION 3.9)
project(cmake_coverage)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.c" "int main() {return 0;}")
add_executable(main
main.c
)
target_compile_options(main
@ribtoks
ribtoks / Database.cpp
Created July 26, 2017 12:14
BerkeleyDB Qt wrappers
#include "database.h"
#include <QDir>
#include <cstring>
#include <cmath>
#include <db.h>
#include "../Common/defines.h"
#include "constants.h"
#define DEFAULT_PAGESIZE (1024)
#define DEFAULT_CONCURRENT_TRANSACTIONS (100)
@jerome-pouiller
jerome-pouiller / cross-compile-ldd
Last active February 26, 2024 03:03
ldd drop-in replacement for cross-compilation toolchains.
#!/bin/bash
# ldd drop-in replacement for cross-compilation toolchains.
# This file is a slightly modified version of xldd.in from
# crosstool-ng 1.22.0
# In order to use it, copy it in same directory than other
# toolchain binaries and rename it with same tuple.
# (i.e. /opt/arm-sysmic-linux-gnueabihf/bin/arm-sysmic-linux-gnueabihf-ldd)
@tuxlinuxien
tuxlinuxien / install-shadowsocks-ubuntu.sh
Last active October 25, 2023 02:08
Shadowsocks installer for ubuntu 16.04
#!/bin/sh
cd $HOME;
echo "Running apt-get update ..."
sudo apt-get update > /dev/null
echo "Install installing dependencies ..."
sudo apt-get install -y --no-install-recommends gettext build-essential autoconf libtool libpcre3-dev asciidoc xmlto libev-dev libc-ares-dev automake libmbedtls-dev libsodium-dev > /dev/null
if [ -d "shadowsocks-libev" ]; then
echo -n;
@ianmac45
ianmac45 / qsettings-xml.hpp
Last active November 29, 2023 07:03
XML Format for QSettings
#pragma once
//TODO include appropriate headers
#include <QtCore/QtCore>
#include <QtXml/QtXml>
bool readSettingsXml(QIODevice &device, QMap<QString, QVariant> &map);
bool writeSettingsXml(QIODevice &device, const QMap<QString, QVariant> &map);
static const QSettings::Format xmlFormat = QSettings::registerFormat("xml", &readSettingsXml, &writeSettingsXml);
static const QString rootName = "config";