This file contains hidden or 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
sudo -u www-data php /var/www/html/cloud.mysite.it/updater/updater.phar --no-interaction |
This file contains hidden or 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 <QCoreApplication> | |
#include <QVariant> | |
#include <QSerialPort> | |
#include <QSerialPortInfo> | |
#include <QModbusRtuSerialClient> | |
#include <QModbusDevice> | |
#include <QModbusClient> | |
#include <QVariant> | |
#include <QSerialPort> | |
#include <thread> |
This file contains hidden or 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
for folder in $(ls -d */); do | |
cd $folder | |
echo | |
echo =========================== | |
echo $folder | |
echo =========================== | |
for branch in $(git branch -r | grep -v HEAD | cut -d / -f 2,3,4,5); do | |
echo | |
echo "=>" $branch |
This file contains hidden or 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
UPDATE mysql.user SET Super_Priv='Y' WHERE user='<myuser>' AND host='localhost'; |
This file contains hidden or 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
:: Prerequisite: git | |
:: Usage: Download the wizard | |
:: Create a file named "repos.txt" in the same folder of the wizard | |
:: Insert in the file the absolute path of the repositories to track, one per line | |
:: Double click on the wizard and follow the instructions | |
:: Contribution: Feel free to contribute to this script! | |
:: Credits: Edoardo Vignati <[email protected]> | |
:: Emanuele De Filippis <[email protected]> | |
This file contains hidden or 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
map.on("singleclick", function(e) { | |
feature = map.forEachFeatureAtPixel(e.pixel, function(feature) { | |
return feature; | |
}); | |
var coord = feature.getGeometry().getCoordinates(); | |
coord = ol.proj.transform(coord,"EPSG:3857","EPSG:4326"); | |
console.log(coord); | |
}); | |
map.on("pointermove", function (evt) { |
This file contains hidden or 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
==== my_main.cpp ==== | |
#include <iostream> | |
#include "my_vector.hpp" | |
using namespace std; | |
int main() | |
{ | |
vector<int> myvec = {1, 2, 3}; | |
add_to_vector(myvec, 4); | |
for(int elem : myvec){ | |
cout << elem << endl; |
This file contains hidden or 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
def convert_bool_array_to_int(bool_array): | |
to_str_array = [str(int(x)) for x in bool_array] | |
return int("".join(to_str_array), 2) | |
def convert_int_to_bool(int_value): | |
to_byte_string = "{0:b}".format(int(int_value)).rjust(5, "0") | |
return [x == "1" for x in to_byte_string] |
This file contains hidden or 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
#!/usr/bin/env python | |
# Updated in june 2022 | |
import sys | |
import requests | |
import re | |
if len(sys.argv) != 2 or sys.argv[1] == "": | |
print("Provide a valid Facebook url page such as \"https://www.facebook.com/acme\"") | |
exit() | |
try: |
NewerOlder