Skip to content

Instantly share code, notes, and snippets.

View Naios's full-sized avatar

Denis Blank Naios

  • Germany
View GitHub Profile
@Naios
Naios / Expected.cpp
Last active July 10, 2016 12:57
My implementation of Expected/ErrorOr
/**
* Copyright 2016 Denis Blank <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
#include "TaskScheduler.h"
#include "Duration.h"
template<typename T, typename P>
std::function<void(TaskContext)> ExecuteWhen(T&& task, P&& predicate) {
return [=](TaskContext context) {
if (predicate())
task(std::move(context));
else
context.Repeat(Milliseconds(10));
diff --git a/dep/protobuf/CMakeLists.txt b/dep/protobuf/CMakeLists.txt
index 5ea6a4e..3b2a7e1 100644
--- a/dep/protobuf/CMakeLists.txt
+++ b/dep/protobuf/CMakeLists.txt
@@ -57,7 +57,7 @@ else()
)
endif()
-add_library(protobuf STATIC ${protobuf_STAT_SRCS})
+add_library(protobuf ${protobuf_STAT_SRCS})
diff --git a/src/server/game/CMakeLists.txt b/src/server/game/CMakeLists.txt
index 60e8609..239e59d 100644
--- a/src/server/game/CMakeLists.txt
+++ b/src/server/game/CMakeLists.txt
@@ -23,27 +23,36 @@ GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
add_definitions(-DTRINITY_API_EXPORT_GAME)
-add_library(game
- ${PRIVATE_PCH_SOURCE}

h1. Introduction

TrinityCore is a rather complex and demanding software, and as such, it may seem quite daunting to install and maintain. This guide will attempt to describe and also practically show in details how to setup your server environment.\ Every step of the guide is divided in three tabs (probably more will follow) regarding different operating systems (mainly divided into LinuxOS X and Windows).

The guide has been divided into 5 steps, to make it more readable:

[Requirements]

[Core Installation]

[Databases Installation]

diff --git a/cmake/compiler/msvc/settings.cmake b/cmake/compiler/msvc/settings.cmake
index be8028d..b9de31e 100644
--- a/cmake/compiler/msvc/settings.cmake
+++ b/cmake/compiler/msvc/settings.cmake
@@ -84,3 +84,11 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zm500")
# 'function' : member function does not override any base class virtual member function
# 'virtual_function' : no override available for virtual member function from base 'class'; function is hidden
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /we4263 /we4264")
+
+# TODO add message
@Naios
Naios / test.cpp
Created September 19, 2015 21:31
(npc1->move(point1) && npc2->move(point2) && npc3->move(point3) && npc4->move(point4))
.then([]
{
// ... do something
});
import java.io.BufferedOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.util.HashMap;
import java.util.Map;
import org.apache.felix.main.AutoProcessor;
import org.osgi.framework.Constants;
import org.osgi.framework.FrameworkEvent;
@Naios
Naios / Main.java
Created August 24, 2015 21:01
Extract TC Authors from commits
import java.nio.charset.StandardCharsets;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.util.Iterator;
import java.util.Optional;
import java.util.Set;
import java.util.TreeSet;
import java.util.stream.Collectors;
@Naios
Naios / range.h
Created August 7, 2015 20:37
Using C++11 auto for syntax with ranges
#ifndef range_h__
#define range_h__
#include <iterator>
template<typename T>
class range_iterator
: public std::iterator<std::forward_iterator_tag, T>
{