// initialize cURL $ch = curl_init(); // set the URL of the remote resource to download curl_setopt($ch, CURLOPT_URL, ‘http://www.site.com/index.html’); //set url as curl_init() parameter –> $ch = curl_init(‘http://www.site.com/index.html’); // required that no headers be downloaded curl_setopt($ch, CURLOPT_HEADER, 0); // prevent remote content from being passed to print curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // set the timeout to…
Leggi tutto
Decode JSON object with an array value: $jsonobj = ‘{“dataset”:[{“field1″:”hello”,”field2″:0,”field3″:1},{“field1″:”hola”,”field2″:2,”field3″:3}]}’; $obj = json_decode($jsonobj); // it returns object $array_dataset = $obj->dataset; for ($i = 0; $i < count($array_dataset); $i++) { $singoloArray = $array_dataset[$i]; foreach($singoloArray as $field => $value) { echo $field . ” => ” . $value . “<br>”; } } Decode array of JSON object:…
Leggi tutto
NFS è un servizio veramente comodo per creare condivisione file all’interno della propria network area. Ho provato a creare un servizio NFS con Ubuntu Server e condividere una cartella con due sistemi Windows, un Windows Server2008R2 e un Windows 10 Pro. Tutto funziona veramente benissimo da mesi. Per la gestione NFS da Windows ho trovato…
Leggi tutto
Tested on Ubuntu 18.04 LTS sudo nano /etc/apache2/conf-available/phpmyadmin.conf #Restrict phpMyAdmin via IP address Order Deny,Allow Deny from All Allow from 10.1.1.10 sudo /etc/init.d/apache2 restart GNU nano 2.2.6 File: /etc/apache2/conf-available/phpmyadmin.conf # phpMyAdmin default Apache configuration Alias /phpmyadmin /usr/share/phpmyadmin An example of a full conf file, whereto we give full access to an entairly network addresses #Restrict…
Leggi tutto
Rimuovere completamente i riferimenti SVN da una cartella ricorsivamente: cd </yourFolderPath> find -name “.svn” | xargs /bin/rm -rf Undo add… se per sbaglio come capita spesso si chiama “add” e involontariamente si aggiungono infiniti file da committare che non si desiderava versionare, per tornare indietro prima di aver committato basta eseguire: cd <yourFolderPath> svn revert…
Leggi tutto
Embedded World 2020 — Norimberga Come ogni anno si è tenuta la fiera Embedded World, dedicata a tutti gli operatori del settore hardware e software dedicati alla creazione di soluzioni IT custom. Non mancava nessuno, per qualsiasi tipo di progetto c’era il fornitore giusto. Veramente una fiera molto specializzata, unica pecca a mio avviso è…
Leggi tutto