Skip to content

Instantly share code, notes, and snippets.

View gccore's full-sized avatar

Ghasem Ramezani gccore

View GitHub Profile
@gccore
gccore / CMakeLists.txt
Created July 8, 2022 14:44
Qt Creator Plain C++ CMake Project Template
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
set(PROJECT_MAJOR_VERSION 1)
set(PROJECT_MINOR_VERSION 0)
set(PROJECT_PATCH_VERSION 0)
cmake_policy(SET CMP0100 NEW) # For *.hh, MOC
project(%{ProjectName}
LANGUAGES CXX
@gccore
gccore / VisualStudioDark.xml
Last active July 16, 2022 09:34
QtCreator VisualStudioDark
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="Dark+">
<style name="Text" foreground="#d4d4d4" background="#1e1e1e"/>
<style name="Link" foreground="#d6c540"/>
<style name="Selection" background="#264f78"/>
<style name="LineNumber" foreground="#8a8a8a"/>
<style name="SearchResult" background="#613214"/>
<style name="SearchResultAlt1" foreground="#000033" background="#b6ccff"/>
<style name="SearchResultAlt2" foreground="#330000" background="#ffb6cc"/>
<style name="SearchResultContainingFunction" foreground="#000000" background="#ffffff"/>
@gccore
gccore / Main.C
Last active July 19, 2022 14:50
Binary representation
#include <iostream>
#include <cstring>
#include <cstdint>
template <typename Type>
void PrintBinary(Type const& value)
{
unsigned char bytes[sizeof(Type)] = {0};
std::memcpy(bytes, reinterpret_cast<unsigned char const*>(&value),
sizeof(Type));
@gccore
gccore / GCCoreGrayscale.xml
Last active August 7, 2022 12:38
My QtCreator's Theme
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="Grayscale (Ghasem)">
<style name="Text" foreground="#000000" background="#fdf6e3"/>
<style name="Link" foreground="#0000ff"/>
<style name="Selection" foreground="#ffffff" background="#43ace8"/>
<style name="LineNumber" foreground="#676767"/>
<style name="SearchResult" background="#ffef0b"/>
<style name="SearchResultAlt1" foreground="#000033" background="#b6ccff"/>
<style name="SearchResultAlt2" foreground="#330000" background="#ffb6cc"/>
<style name="SearchResultContainingFunction" foreground="#000000" background="#ffffff"/>
@gccore
gccore / CMakeLists.txt
Last active July 30, 2022 21:13
Discord Game SDK CMake
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
project(TestingDiscordSDK LANGUAGES CXX)
set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_BUILD_RPATH "$ORIGIN/lib;$ORIGIN/../lib;$ORIGIN")
set(CMAKE_INSTALL_RPATH "$ORIGIN/lib;$ORIGIN/../lib;$ORIGIN")
set(discord_sdk_dir /tmp/Something/discord_game_sdk)
#
@gccore
gccore / main.cc
Created February 18, 2023 12:39
ReadWrite Qt
/*
CMakeLists.txt:
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
project(ReadWrite LANGUAGES CXX)
find_package(Qt5Core REQUIRED)
find_package(Threads REQUIRED)
add_executable(${PROJECT_NAME} main.cc)
@gccore
gccore / nobody_likes_it.xml
Created April 2, 2023 13:10
Nobody likes it
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="AnotherWhite">
<style name="Text" foreground="#ffff50" background="#120e41"/>
<style name="Link" foreground="#60b2ff"/>
<style name="Selection" foreground="#ffffff" background="#43ace8"/>
<style name="LineNumber" foreground="#ffffff"/>
<style name="SearchResult" background="#baae08"/>
<style name="SearchResultAlt1" foreground="#000033" background="#b6ccff"/>
<style name="SearchResultAlt2" foreground="#330000" background="#ffb6cc"/>
<style name="SearchResultContainingFunction" foreground="#000000" background="#ffffff"/>
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="AnotherWhite (copy)">
<style name="Text" foreground="#c6c3c6" background="#000000"/>
<style name="Link" foreground="#60b2ff"/>
<style name="Selection" foreground="#ffffff" background="#43ace8"/>
<style name="LineNumber" foreground="#c6c3c6"/>
<style name="SearchResult" background="#4415d0"/>
<style name="SearchResultAlt1" foreground="#000033" background="#b6ccff"/>
<style name="SearchResultAlt2" foreground="#330000" background="#ffb6cc"/>
<style name="SearchResultContainingFunction" foreground="#000000" background="#ffffff"/>
@gccore
gccore / ghasem_style.xml
Created April 22, 2023 21:30
My QtCreator Style
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="GhasemStyle">
<style name="Text" foreground="#fcfcfc" background="#232627"/>
<style name="Link" foreground="#60b2ff"/>
<style name="Selection" foreground="#232627" background="#fcfcfc"/>
<style name="LineNumber" foreground="#c6c3c6"/>
<style name="SearchResult" background="#4415d0"/>
<style name="SearchResultAlt1" foreground="#000033" background="#b6ccff"/>
<style name="SearchResultAlt2" foreground="#330000" background="#ffb6cc"/>
<style name="SearchResultContainingFunction" foreground="#000000" background="#ffffff"/>
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="Anotherblue">
<style name="Text" foreground="#b2b2b2" background="#1818b2"/>
<style name="Link" foreground="#60b2ff"/>
<style name="Selection" foreground="#fcfcfc" background="#232627"/>
<style name="LineNumber" foreground="#b2b2b2"/>
<style name="SearchResult" background="#4415d0"/>
<style name="SearchResultAlt1" foreground="#000033" background="#b6ccff"/>
<style name="SearchResultAlt2" foreground="#330000" background="#ffb6cc"/>
<style name="SearchResultContainingFunction" foreground="#000000" background="#ffffff"/>