Let's see the attached usb drive
$ sudo diskutil listNow, from the list, note the usb drive name and path
$ sudo diskutil eraseDisk FAT32 NAME MBRFormat /dev/diskXLet's see the attached usb drive
$ sudo diskutil listNow, from the list, note the usb drive name and path
$ sudo diskutil eraseDisk FAT32 NAME MBRFormat /dev/diskX| sudo arping -D -I INTERFACE_NAME -c 2 IP_TO_CHECK | |
| echo $? # If 0, means NO duplicated...Hurray ! |
| netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n |
| DELIMITER // | |
| CREATE PROCEDURE search_replace_db(IN db_name VARCHAR(255), IN search_for VARCHAR(255), IN replace_with VARCHAR(255)) | |
| BEGIN | |
| DECLARE done INT DEFAULT FALSE; | |
| DECLARE tableName VARCHAR(100); | |
| DECLARE columnName VARCHAR(100); | |
| DECLARE cur CURSOR FOR | |
| SELECT TABLE_NAME, COLUMN_NAME | |
| FROM INFORMATION_SCHEMA.COLUMNS |
Note: Se avete seguito la guida fornita da fatturapa avete generato la chiave con openssl. Il formato è PKCS-8
| /** | |
| * Recursively compare two JSON objects and print out their differences. | |
| * | |
| * Differences are logged to the console in the form: | |
| * "Difference at path: <path>, val1 = <valueInObj1>, val2 = <valueInObj2>" | |
| * | |
| * @param {object} obj1 - First JSON object | |
| * @param {object} obj2 - Second JSON object | |
| */ | |
| function deepCompareJSON(obj1, obj2) { |
| import random | |
| def monty_hall_trial(switch: bool) -> bool: | |
| """ | |
| Run a single Monty Hall trial. | |
| Returns True if the player wins the car, False otherwise. | |
| """ | |
| doors = [0, 1, 2] | |
| prize = random.choice(doors) # door hiding the prize |
| #!/usr/bin/env python3 | |
| """ | |
| Resource-Aware Markov Chain Indexer (PoC) | |
| Attempt | |
| ----- | |
| Index a very large corpus (up to ~25 TB) of heterogeneous documents (pdf, docx, txt, images) | |
| by building an n-gram Markov chain (order=2 or 3) over tokenized text in a *disk-backed* way. | |
| Design Principles |
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| [[ "${DEBUG:-0}" == "1" ]] && set -x | |
| # --- Requirements ------------------------------------------------------------- | |
| command -v jq >/dev/null || { echo "[x] jq not found"; exit 1; } | |
| # rg is optional; we'll check later for the malware scan | |
| TOOL="${TOOL:-npm}" | |
| # --- Watchlist ---------------------------------------------------------------- |