This manual explains how to set up a low-cost NAS server to store videos from a Xiaomi camera, model MI Security Camera.
You can use a development board Linux based such as Raspberry PI or similar, an old PC, Barebone etc.
Install samba.
This manual explains how to set up a low-cost NAS server to store videos from a Xiaomi camera, model MI Security Camera.
You can use a development board Linux based such as Raspberry PI or similar, an old PC, Barebone etc.
Install samba.
deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware | |
deb-src http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware | |
deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware | |
deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware | |
deb http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware | |
deb-src http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware | |
deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware |
#!/bin/bash | |
BLACKLIST_DEVICES="/dev/sda /dev/sdb /dev/sdc /dev/sdd" | |
DD_BIN="/usr/bin/dd" | |
main() { | |
for arg in $@; do | |
for dev in $BLACKLIST_DEVICES; do | |
if [[ "$arg" == *"$dev"* ]]; then |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
void string_split(char * string, char sep, char *** r_array_string, int * r_size) { | |
int i, k, len, size; | |
char ** array_string; | |
// Number of substrings |
#!/usr/bin/env python | |
# | |
# On EXOS shell create exos-bash.py. | |
# | |
# EXOS> edit script exos-bash.py | |
# | |
# Copy this entire content to exos-bash.py file. | |
# | |
################################## |
import logging | |
import os | |
LOG_ENVIRON = "LOGLEVEL" | |
LOG_LEVEL_DEFAULT = logging.INFO | |
LOG_FILE = "/tmp/myapplication.log" | |
LOG_FORMAT = '%(asctime)-15s [%(levelname)s] %(message)s' | |
LOG_NAME = "myapplication" |
#!/bin/bash | |
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT | |
iptables -A INPUT -i lo -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT | |
iptables -P INPUT DROP | |
iptables -P FORWARD DROP | |
iptables -P OUTPUT ACCEPT |
#!/usr/bin/env python3 | |
class MyPersonClass: | |
# Class attributes | |
count_instances = 0 | |
def __init__(self, name: str, surname: str, years: int): | |
MyPersonClass.count_instances += 1 |
#!/usr/bin/env python3 | |
import os | |
import signal | |
import sys | |
import time | |
PROCESS_PID_FILE = "process.pid" | |
_finish = False |
#!/usr/bin/env python3 | |
import argparse | |
import sys | |
if __name__ == "__main__": | |
""" | |
Running examples: | |