Send Telegram notification from Draytek

Thật chất ra cách này dùng SMS Provider, và Telegram chính là 1 SMS Provider Đầu tiên tạo 1 SMS Provider trong Objects Setting >> SMS/Mail Service Object<Token>/sendMessage?chat_id=-<BotID>&text=###txtMsg### To create a chatbot on Telegram, you need to contact the BotFather, which is essentially a bot used to create other bots. The command you need is /newbot which... Continue Reading →

SSH Jump host

Host gatekeeper HostName <wanip> User soulevil Port 422 Host workstation HostName <localip> User soulevil ProxyJump gatekeeper ProxyJump will use gatekeeper as jumper

SOLID principles in PHP

SOLID is a set of principles that can be applied to object-oriented programming to make code more maintainable, flexible, and understandable. These principles were introduced by Robert C. Martin and have become widely adopted by developers across various programming languages, including PHP. What are the SOLID principles? The SOLID principles are an acronym that stands... Continue Reading →

PHP: The 3 Pillars of OOP

Object-Oriented Programming (OOP) is a programming paradigm that is centered around the principle of objects. Objects are instances of classes, which are templates that define the properties and methods that an object can have. OOP is based on three main pillars: Encapsulation, Inheritance, and Polymorphism. Encapsulation Encapsulation is the principle of hiding the internal workings of an object... Continue Reading →

Difference between PUT, POST, GET, DELETE and PATCH in HTTP Verbs:

Create - POST Read - GET Update - PUT Delete - DELETE Partical update - PATCH Submits a partial modification to a resource. If you only need to update one field for the resource, you may want to use the PATCH method. PATCH

My own Prometheus

# my global config global: scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. # scrape_timeout is set to the global default (10s). # Alertmanager configuration alerting: alertmanagers: - static_configs: - targets: - alertmanager:9093... Continue Reading →

Laravel scope

You can use Laravel scopes to DRY up the code. The scope is just a method that you can use in your model to encapsulate the syntax used to execute a query such as above. Scopes are defined by prefixing the name of a method with scope, as below. Scope class will be implemented from... Continue Reading →

Abstract vs Interface in PHP

Interface Allow define methods should be implement in a class When one or more classes use same interface, it's called "polymorphism" What interface does Can't have properties All methods must be public By default all methods are abstract Abstract A class with abstract methods, and need its children classes to fill out Abstract method is... Continue Reading →

[Router] 3912s HostClockNotSynchronising

By default NTP is not enabled on Ubuntu admin@Vigor3912:~$ timedtimedatectl status Local time: Wed 2023-03-01 18:45:33 +07 Universal time: Wed 2023-03-01 11:45:33 UTC RTC time: Wed 2023-03-01 11:17:43 Time zone: Asia/Bangkok (+07, +0700) System clock synchronized: no NTP service: n/a RTC in local TZ: no Then we need enable it sudo apt install ntp sudo... Continue Reading →

Ubuntu – Netplan Netplan relies on a 'renderer' that instructs netplan what output format to use. Current netplan versions support two renderers: systemd-networkd NetworkManager Going forward in Ubuntu, you'll want to continue to use netplan, and get familiar with the network scripts it renders for you, based on your individual renderer needs (eg: desktop using NetworkManager vs.... Continue Reading →

Up ↑

%d bloggers like this: