Skip to content

Instantly share code, notes, and snippets.

View manchoz's full-sized avatar

Giampaolo Mancini manchoz

View GitHub Profile
@manchoz
manchoz / vimeo-downloader.js
Created November 9, 2023 09:12 — forked from mistic100/vimeo-downloader.js
Download video from Vimeo (chopped m4s files)
// 1. Open the browser developper console on the network tab
// 2. Start the video
// 3. In the dev tab, locate the load of the "master.json" file, copy its full URL
// 4. Run: node vimeo-downloader.js "<URL>"
// 5. Combine the m4v and m4a files with mkvmerge
const fs = require('fs');
const url = require('url');
const https = require('https');
@manchoz
manchoz / vimeo-download.py
Created November 9, 2023 09:11 — forked from alexeygrigorev/vimeo-download.py
Downloading segmented video from vimeo
import requests
import base64
from tqdm import tqdm
master_json_url = 'https://178skyfiregce-a.akamaihd.net/exp=1474107106~acl=%2F142089577%2F%2A~hmac=0d9becc441fc5385462d53bf59cf019c0184690862f49b414e9a2f1c5bafbe0d/142089577/video/426274424,426274425,426274423,426274422/master.json?base64_init=1'
base_url = master_json_url[:master_json_url.rfind('/', 0, -26) + 1]
resp = requests.get(master_json_url)
content = resp.json()
@manchoz
manchoz / deep_sleep_snapshot.py
Created January 16, 2023 11:23
Nicla Vision MicroPython Deep Sleep Example
# Deep Sleep Mode Example
# This example demonstrates the low-power deep sleep mode plus sensor shutdown.
# Note the camera will reset after wake-up from deep sleep. To find out if the cause of reset
# is deep sleep, call the machine.reset_cause() function and test for machine.DEEPSLEEP_RESET
import pyb, machine, sensor, time, random
# Create and init RTC object.
rtc = pyb.RTC()
# (year, month, day[, hour[, minute[, second[, microsecond[, tzinfo]]]]])
@manchoz
manchoz / DKT30CSDHPD3.log
Last active September 21, 2022 10:29
X8 USB-C Logs
U-Boot SPL 2021.04+fio+gcdd676d7a3 (Feb 24 2022 - 18:19:51 +0000)
power_bd71837_init
Turn on SE050
DDRINFO: start DRAM init
DDRINFO: DRAM rate 3000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
Normal Boot
Trying to boot from MMC2
SPL: Booting primary boot path: using 0x300 offset for next boot image
@manchoz
manchoz / EthernetPortentaHostnameCharArray
Created January 29, 2021 11:29
Example of Arduino Portenta H7 w/ Vision Shield Ethernet (mbedOS API) with Hostname as Char Array
#include "EthernetInterface.h"
EthernetInterface net;
void setup()
{
Serial.begin(115200);
while (!Serial)
;
@manchoz
manchoz / EthernetPortentaHostnameString
Last active January 29, 2021 11:27
Example of Arduino Portenta H7 w/ Vision Shield Ethernet (mbedOS API) with Hostname as String
#include "EthernetInterface.h"
EthernetInterface net;
void setup()
{
Serial.begin(115200);
while (!Serial)
;
@manchoz
manchoz / test-run-usb.log
Created November 12, 2019 22:30
MakerDiary nRF52840-MDK MbedOS Tests
mbedgt: greentea test automation tool ver. 1.7.3
mbedgt: test specification file './BUILD/tests/MAKERDIARY_NRF52840_MDK/GCC_ARM/test_spec.json' (specified with --test-spec option)
mbedgt: using './BUILD/tests/MAKERDIARY_NRF52840_MDK/GCC_ARM/test_spec.json' from current directory!
mbedgt: detecting connected mbed-enabled devices...
mbedgt: detected 1 device
| platform_name | platform_name_unique | serial_port | mount_point | target_id |
|-------------------------|----------------------------|--------------|---------------------------|--------------------------------------------------|
| MAKERDIARY_NRF52840_MDK | MAKERDIARY_NRF52840_MDK[0] | /dev/ttyACM0 | /run/media/mancho/DAPLINK | 1026000013af569300000000000000000000000097969902 |
mbedgt: processing target 'MAKERDIARY_NRF52840_MDK' toolchain 'GCC_ARM' compatible platforms... (note: switch set to --parallel 1)
| platform_name | platform_name_unique | serial_port |
@manchoz
manchoz / docker-compose.yml
Created May 31, 2018 19:55
docker-compose.yml
version: "3.6"
networks:
net-sito1:
net-sito2:
services:
mysql-sito1:
image: mysql:5.7
environment:
@manchoz
manchoz / etc_hosts
Last active April 19, 2018 19:29
Esempi HTML
192.168.56.101 sito1.localdomain sito2.localdomain sito3.localdomain sito4.localdomain
/*
Basic ESP8266 MQTT example
This sketch demonstrates the capabilities of the pubsub library in combination
with the ESP8266 board/library.
It connects to an MQTT server then:
- publishes "hello world" to the topic "outTopic" every two seconds
- subscribes to the topic "inTopic", printing out any messages
it receives. NB - it assumes the received payloads are strings not binary