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 | |
# grep -rn "#pragma once" src/* | sed 's/:1:#pragma once//g' > file_list | |
for name in $(cat file_list); | |
do | |
echo $name; | |
cleaned=$(echo $name | sed 's/src\/uvw\///g' | sed 's/\.hpp//g' | sed 's/\.h//g') | |
echo $cleaned | |
upper=$(echo $cleaned | tr '[a-z]' '[A-Z]' | xargs -r -n1 -I {} echo UVW_{}_INCLUDE_H) |
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 <uvw.hpp> | |
#include <cassert> | |
#include <iostream> | |
#include <memory> | |
#include <chrono> | |
int main() { | |
using namespace std::chrono_literals; | |
// get the default loop |
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
# - Find libmosquittopp | |
# Find the native libmosquittopp includes and libraries | |
# | |
# MOSQUITTOPP_INCLUDE_DIR - where to find mosquitto.h, etc. | |
# MOSQUITTOPP_LIBRARIES - List of libraries when using libmosquittopp. | |
# MOSQUITTOPP_FOUND - True if libmosquittopp found. | |
if (NOT MOSQUITTOPP_INCLUDE_DIR) | |
find_path(MOSQUITTOPP_INCLUDE_DIR mosquitto.h) | |
endif() |
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
# - Find libjsoncpp | |
# Find the native libjsoncpp includes and libraries | |
# | |
# JSONCPP_INCLUDE_DIR - where to find json.h, etc. | |
# JSONCPP_LIBRARIES - List of libraries when using libjsoncpp. | |
# JSONCPP_FOUND - True if libjsoncpp found. | |
if (NOT JSONCPP_INCLUDE_DIR) | |
find_path(JSONCPP_INCLUDE_DIR json/value.h HINTS /usr/include/jsoncpp) | |
endif() |
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 | |
git commit --amend --reset-author |
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
# SHELL 1: | |
tmux | |
Ctrl+b \" | |
Ctrl+b o | |
# SHELL 1: clean docker env | |
docker ps -aq | xargs -r -n1 docker rm -f | |
docker images -aq | xargs -r -n1 docker rmi -f | |
clear |
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 | |
find . -name "*.cpp" | grep "cpp$" | sed 's/cpp$//g' | xargs -r -n1 -I {} echo mv {}cpp {}hpp | |
find . -name "*.hpp" | xargs -r -n1 -I {} sed -i '1s;^;#pragma once\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
--- a/src/jsonrpccpp/server/connectors/httpserver.cpp | |
+++ b/src/jsonrpccpp/server/connectors/httpserver.cpp | |
@@ -43,22 +43,8 @@ IClientConnectionHandler *HttpServer::GetHandler(const std::string &url) { | |
bool HttpServer::StartListening() { | |
if (!this->running) { | |
- const bool has_epoll = | |
- (MHD_is_feature_supported(MHD_FEATURE_EPOLL) == MHD_YES); | |
- const bool has_poll = | |
- (MHD_is_feature_supported(MHD_FEATURE_POLL) == MHD_YES); |
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 | |
# clear terminal window | |
clear | |
# variabili per creare sotto cartelle iOS, Android e WP | |
export RET_PATH=$PWD | |
###### iOS | |
mkdir ./iOS |
NewerOlder