Un elenco di risorse su MQTT e MOSQUITTO
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
import java.awt.*; | |
import java.awt.event.*; | |
import javax.swing.*; | |
class Apology extends JFrame { | |
public static void main(String[] args) | |
{ | |
EventQueue.invokeLater(new Runnable() { | |
public void run() { | |
new Apology(); |
It encodes things such as graphic primitives, images, pointer motion, and key presses.
- X11 (X Window System)
- Wayland
Coordina I/O dei client ("xclient") da e verso il resto del sistema operativo e l'hardware. Gira all'interno del Kernel.
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
# redirect output and errors into file output.log: | |
nohup some_command > output.log 2>&1& | |
# abbreviated syntax for bash version >= ver.4: | |
nohup some_command &> output.log |
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
/* | |
Recursively traverses all collections and objects/arrays contained within documents replacing every | |
instance of 'find' with 'replace'. | |
mongo <db_name> mongo_search_and_replace.js | |
*/ | |
function escapeRegExp(str) { | |
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); | |
} |
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
if (typeof JSON.decycle !== "function") { | |
JSON.decycle = function decycle(object, replacer) { | |
"use strict"; | |
var objects = new WeakMap(); // object to path mappings | |
return (function derez(value, path) { | |
var old_path; |
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
import {fileTypeFromStream} from 'file-type'; | |
const url = 'https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg'; | |
const response = await fetch(url); | |
const fileType = await fileTypeFromStream(response.body); | |
console.log(fileType); | |
//=> {ext: 'jpg', mime: 'image/jpeg'} |