Skip to content

Instantly share code, notes, and snippets.

@lighta
lighta / modif_1
Created November 26, 2017 05:44
endow_test
lvl =0
100, 100, 100, 100, 100, 100, 100, 100, 70, 100, 0, 0,
100, 25, 100, 150, 90, 100, 75, 100, 100, 100, 0, 0,
100, 100, 25, 90, 150, 100, 75, 100, 100, 100, 0, 0,
100, 90, 150, 25, 100, 100, 75, 100, 100, 125, 0, 0,
100, 175, 90, 100, 25, 100, 75, 100, 100, 100, 0, 0,
100, 100, 125, 125, 125, 0, 75, 50, 100, -25, 0, 0,
100, 100, 100, 100, 100, 100, 0, 125, 100, 150, 0, 0,
100, 100, 100, 100, 100, 50, 125, 0, 100, -25, 0, 0,
70, 100, 100, 100, 100, 100, 75, 75, 125, 100, 0, 0,
@lighta
lighta / raString
Created November 18, 2017 11:16
testing string with maxlen
/*
* File: main.cpp
* Author: lighta
*
* Created on November 18, 2017, 4:17 AM
*/
#include <cstdlib>
#include <string>
#include <iostream>
@lighta
lighta / boringssl.diff
Created January 2, 2017 02:50
grpc_crossCompile_v1.0.x
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8493559..93555fb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,7 +27,7 @@ if (NOT GO_EXECUTABLE)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- set(C_CXX_FLAGS "-Wall -Werror -Wformat=2 -Wsign-compare -Wmissing-field-initializers -ggdb -fvisibility=hidden")
+ set(C_CXX_FLAGS "-Wall -Wformat=2 -Wsign-compare -Wmissing-field-initializers -ggdb -fvisibility=hidden")
#our cmake
find_package( OpenCV COMPONENTS highgui videoio )
#find_package(OpenCV COMPONENTS world)
if (OPENCV_VIDEOIO_FOUND)
ADD_EXECUTABLE( capture_tags capture_tags.cpp)
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
#TARGET_LINK_LIBRARIES(capture_tags tinytag ${OpenCV_LIBS})
TARGET_LINK_LIBRARIES( capture_tags tinytag libopencv_world.so)
if ("${OpenCV_VERSION_STATUS}" STREQUAL "-dev")
| cCalibWidthCenter.cpp(1071): warning C4081: expected ')'; found 'user-defined string literal1 ll1071'|
cCalibWidthCenter.cpp:
l1 : #include "stdafx.h"
l1071 : TODO("hange ths magic number by a macro")
stdafx.h:
#define TODO(x) __pragma(message(__FILE__"("STR_EXPAND(__LINE__)") : TODO : "STR_EXPAND(x)))
@lighta
lighta / devotion_722.diff
Created December 31, 2015 09:37
* cf issue #722, devotion code Move devotion check_distance to map_moveblock check, Extend battle_check_devotion and replace duplicate code with it Add skill_foundDevotionPlace meant to search for a valid place for new devotion, (small performance upd and avoid duplicate)
diff --git a/src/map/battle.c b/src/map/battle.c
index 0d87c16..1d03c01 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -313,12 +313,14 @@ int battle_delay_damage(unsigned int tick, int amotion, struct block_list *src,
sc = status_get_sc(target);
- if (sc && sc->data[SC_DEVOTION] && sc->data[SC_DEVOTION]->val1)
- d_tbl = map_id2bl(sc->data[SC_DEVOTION]->val1);
@lighta
lighta / test_npc_callshop.txt
Created December 31, 2015 09:21
Trying pull 832
//test menu + callshop + end
prontera,153,180,5 script CallShopBug 89,{
switch(select("Open Shop", "Something", "Something2 "))
{
case 1:
callshop "someshop",1; // open shomeshop with buy list
break;
case 2:
callshop "someshop",2; // open shomeshop with sell list
break;
@lighta
lighta / .c
Created December 30, 2015 18:56
chclif_createnewchar_ack
int chclif_createnewchar_ack(int fd, struct char_session_data* sd,int idx){
//'Charname already exists' (-1), 'Char creation denied' (-2) and 'You are underaged' (-3)
if (idx < 0) {
WFIFOHEAD(fd,3);
WFIFOW(fd,0) = 0x6e;
/* Others I found [Ind] */
/* 0x02 = Symbols in Character Names are forbidden */
/* 0x03 = You are not elegible to open the Character Slot. */
switch (idx) {
nuget {
nuspec {
id = dwos_boost159;
version : 0.4;
title: boost159;
authors: {Dental Wings, Max Moreau};
licenseUrl: "https://en.wikipedia.org/wiki/Boost_Software_License";
projectUrl: "http://www.boost.org/";
iconUrl: "Z:\mmoreau\lib\logo\boost_logo.png";
requireLicenseAcceptance:false;
@lighta
lighta / redmine_3.0.2_timezone
Created April 30, 2015 05:56
Redmine 3.0.2 issue on install
mysql> SELECT @@global.time_zone, @@session.time_zone;
+--------------------+---------------------+
| @@global.time_zone | @@session.time_zone |
+--------------------+---------------------+
| US/Eastern | US/Eastern |
+--------------------+---------------------+
1 row in set (0.00 sec)
mysql> select now();
+---------------------+