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 |
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 | |
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
#!/bin/bash | |
git fetch | |
REMOTE=origin | |
if [ $# -ge 1 ]; then | |
REMOTE=$1 | |
fi | |
echo "Pruning ${REMOTE}: $#" |
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_REPOS_HOME=$PWD \ | |
find . -type d -name '.git*' ! -path "*/poky-tmp/*" 2>/dev/null | \ | |
sed 's/\.git$//g' | \ | |
xargs -I '{}' sh -c 'readlink -e {};' | \ | |
uniq | \ | |
sort | \ | |
xargs -I '{}' sh -c 'cd {}; echo "dir: $(pwd) url: $(git config --get remote.origin.url) branch: $(git rev-parse --abbrev-ref HEAD) hash: $(git rev-parse HEAD)"; cd $GIT_REPOS_HOME;' |
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
// based on https://gist.github.com/mhulse/b11e568260fb8c3aa2a8 | |
void UserLedManager::print_terminal_background_color(const int &r, const int &g, const int &b) const | |
{ | |
auto r_weight = r < 75 ? 0 : (r - 35) / 40; | |
auto g_weight = g < 75 ? 0 : (g - 35) / 40; | |
auto b_weight = b < 75 ? 0 : (b - 35) / 40; | |
int status = (r_weight * 6 * 6 + g_weight * 6 + b_weight + 16); | |
fprintf(stdout, "\e[48;5;%dm %3d \e[0m", status, status); | |
fflush(stdout); | |
} |
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 | |
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
# - 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
# - 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() |
OlderNewer