Skip to content

Instantly share code, notes, and snippets.

View flashvnn's full-sized avatar

Huynh Khac Thao flashvnn

View GitHub Profile
@flashvnn
flashvnn / samba-server-for-xiaomi-cameras.md
Created January 15, 2025 13:11 — forked from gustavorv86/samba-server-for-xiaomi-cameras.md
How to configure a low-cost NAS server for a Xiaomi MI Home Security Camera

Samba Server configuration for Xiaomi MI Home Security Camera

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.

NAS Server Configuration

Install samba.

https://drive.google.com/file/d/1wzXk_B9AZwEDCg_ItXhsMdALwJyU1E-b/view?usp=drive_link
Acronis True Image 2016 - Build 19.0.0.5586
L7NDPETA-7F7UH7WK-4HTHPXJH-LDBUTB48-XEK7KA6Z-Y9HS747F-XDLZDRPQ-QGUJH7JG
or
9ZPATK22-QLD6BJDL-F5EBWM4E-LGYD9K9V-ZDW8K5AH-68WSA48G-Q9LDHY7V-SB8WBY2L
or
6EXRREDY-TDH7QQ9G-M324EPCK-YQZ67WWC-VAAJC787-HY2AV233-AJS4MRZS-BA27MPN8
https://alexshomenetwork.com/linux-desktop-in-browser/
@flashvnn
flashvnn / AmLich.php
Last active September 14, 2023 04:47
AmLich.php
/**
* Thư viện AmLich.
* Example
* $am_lich = new AmLich();
* $al = $am_lich->convertSolar2Lunar(30, 10, 2023, 7.0);
* Ngày: $al[0], Tháng: $al[1], Năm: $al[2]
*/
class AmLich {
public function INT($d) {
@flashvnn
flashvnn / composer.json
Created August 25, 2023 05:16
Drupal ^9.5 patchs
{
"name": "drupal/recommended-project",
"description": "Project template for Drupal 9 projects with a relocated document root",
"type": "project",
"license": "GPL-2.0-or-later",
"homepage": "https://www.drupal.org/project/drupal",
"support": {
"docs": "https://www.drupal.org/docs/user_guide/en/index.html",
"chat": "https://www.drupal.org/node/314178"
},
@flashvnn
flashvnn / ajax_callback_select2_radios.php
Created August 8, 2023 03:41
Ajax callback select2, radios field
<?php
namespace Drupal\nh_phahe\Service;
use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\node\Entity\Node;
/**
@flashvnn
flashvnn / timezone.sh
Last active April 4, 2023 03:41
Webtop timezone update
sudo mv /etc/localtime /etc/localtime.bk
sudo ln -s /usr/share/zoneinfo/Asia/Bangkok /etc/localtime
## install options
sudo apt update
sudo apt install xdg-utils vlc ffmpeg
@flashvnn
flashvnn / wget_curl_ssl_disable.sh
Last active September 13, 2022 09:46
Wget, CURL disable ssl check
# WGET, (Add Last Line to /etc/wgetrc) - check_certificate = off
sudo bash -c "echo 'check_certificate = off' >> /etc/wgetrc"
# CURL, You can add insecure option to your $HOME/.curlrc file:
sudo bash -c "echo 'insecure' >> $HOME/.curlrc"
<?php
namespace Drupal\example\Form;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
/**
* Class AjaxAddMoreForm.
*
@flashvnn
flashvnn / command.sh
Created August 16, 2022 04:48
Command redirect output to log file
|| visible in terminal || visible in file || existing
Syntax || StdOut | StdErr || StdOut | StdErr || file
==========++==========+==========++==========+==========++===========
> || no | yes || yes | no || overwrite
>> || no | yes || yes | no || append
|| | || | ||
2> || yes | no || no | yes || overwrite
2>> || yes | no || no | yes || append
|| | || | ||
&> || no | no || yes | yes || overwrite