Skip to content

Instantly share code, notes, and snippets.

View klongchu's full-sized avatar
🏠
Working from home

Klongchu Dev BUDHOSP klongchu

🏠
Working from home
View GitHub Profile
@klongchu
klongchu / CC.md
Created October 6, 2025 07:55 — forked from mvandermeulen/CC.md
(ISC)2 Flashcards for CC (Certified in Cybersecurity)
  1. Security commensurate with the risk and the magnitude of harm resulting from the loss, misuse or unauthorized access to or modification of information.

Adequate Security

  1. Controls implemented through policy and procedures. Examples include access control processes and requiring multiple personnel to conduct a specific operation. Administrative controls in modern environments are often enforced in conjunction with physical and/or technical controls, such as an access-granting policy for new users that requires login and approval by the hiring manager.

Administrative Controls

  1. The ability of computers and robots to simulate human intelligence and behavior. > Artificial Intelligence
@klongchu
klongchu / thailand.json
Created September 6, 2024 15:29 — forked from jeepkd/thailand.json
Simplified GeoJson for provinces of Thailand. Including new province Bueng Kan.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@klongchu
klongchu / README.md
Created September 2, 2024 13:38 — forked from goliatone/README.md
Postgres TRIGGER to call NOTIFY with a JSON payload

This TRIGGER function calls PosgreSQL's NOTIFY command with a JSON payload. You can listen for these calls and then send the JSON payload to a message queue (like AMQP/RabbitMQ) or trigger other actions.

Create the trigger with notify_trigger.sql.

When declaring the trigger, supply the column names you want the JSON payload to contain as arguments to the function (see create_triggers.sql)

The payload returns a JSON object:

@klongchu
klongchu / docker-dhcpd.md
Created June 20, 2023 02:20 — forked from mikejoh/docker-dhcpd.md
Short guide on how to set up a Docker container as a DHCP server

Setting up a Docker container as a DHCP server

In this guide I’ve tested a number of different commands and configurations using Docker to run a container with dhcpd (+macvlan driver) to serve my clients in my home network. In the end i’ll migrate from my Windows 2012 R2 Server running DHCP to a much more lightweight Docker container (7.42 MB in total). Wow.

My home environment:

  • Firewall (Juniper)
    • I’m running IP helper for bootp which in this case means that i relay DHCP requests from various VLANs into one where i've placed my Windows 2012 R2 server. This is also where my container will live. See the FW configuration below:
{
"allergy": [
{
"request_id": "",
"uid": "",
"provider_code": "11053",
"provider_name": "รพ.กันทรวิชัย",
"drug_name": "",
"symptom": ""
}
{
"drugs": [
{
"request_id": "",
"uid": "",
"provider_code": "11053",
"provider_name": "รพ.กันทรวิชัย",
"seq": "",
"date_serv": "",
"time_serv": "",