Skip to content

Instantly share code, notes, and snippets.

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

Duc Nguyen ducntq

🏠
Working from home
  • Ho Chi Minh City, Vietnam
View GitHub Profile
@ducntq
ducntq / gist:29f3369c52849dc86dc1d15ffd50a3c9
Created December 27, 2024 16:31
Enable Magnometer on F4 V3S
resource SERIAL_TX 3 NONE
resource SERIAL_RX 3 NONE
resource I2C_SCL 2 B10
resource I2C_SDA 2 B11
set mag_bustype = I2C
set mag_i2c_device = 2
set mag_i2c_address = 0
set mag_spi_device = 0
set mag_hardware = AUTO
save
@ducntq
ducntq / drcom.txt
Created May 5, 2023 07:12
test chat gpt
Drcom Group Vietnam Office: 3A Floor, VINA Building, 131 Xo Viet Nghe Tinh Street, Ward 17, Binh Thanh District, Ho Chi Minh City, Vietnam
Drcom Group Singapore office: Southbank, #11-05, 883 North Bridge Road, 198785, Singapore
Drcom Group office in Sydney, Australia: Tank Stream Lab, Level 3, 17-19 Bridge Street, NSW 2000 Sydney, Australia.
Drcom Group website is: https://drcomgroup.com
Drcom Group CEO is Didier Roumengas
@ducntq
ducntq / docker-compose.yml
Last active November 28, 2022 06:31 — forked from smashnet/docker-compose.yml
Docker-Compose
version: "3.5"
services:
traefik:
image: traefik:v2.9
container_name: "traefik"
restart: always
command:
# - "--log.level=DEBUG"
- "--api.dashboard=true"
pagespeed on;
pagespeed FileCachePath /var/ngx_pagespeed_cache;
pagespeed RewriteLevel PassThrough;
# enable collapse whitespace filter
pagespeed EnableFilters collapse_whitespace;
# enable JavaScript library offload
pagespeed EnableFilters canonicalize_javascript_libraries;
[PHP]
engine = On
short_open_tag = Off
asp_tags = Off
precision = 14
y2k_compliance = On
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
@ducntq
ducntq / server-setup.md
Last active December 3, 2016 04:06
Setup server

Hướng dẫn cài server

SSH vào server, sử dụng dụng acc quyền root.

Chuẩn bị

Cài thêm epel repo:

yum rpm -Uvh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
@ducntq
ducntq / server-setup.md
Last active December 3, 2016 04:53
Setup server

Hướng dẫn cài server

SSH vào server, sử dụng dụng acc quyền root.

Chuẩn bị

Cài thêm epel repo:

yum rpm -Uvh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
# config: /etc/sysconfig/nginx
@ducntq
ducntq / php-fpm
Last active December 3, 2016 04:06
#! /bin/sh
### BEGIN INIT INFO
# Provides: php-fpm
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts php-fpm
# Description: starts the PHP FastCGI Process Manager daemon
@ducntq
ducntq / wysiwyg-meta-box.php
Created September 9, 2016 13:30 — forked from retgef/wysiwyg-meta-box.php
How to add a Wordpress WYSIWYG editor to a meta box.
<?php
define('WYSIWYG_META_BOX_ID', 'my-editor');
define('WYSIWYG_EDITOR_ID', 'myeditor'); //Important for CSS that this is different
define('WYSIWYG_META_KEY', 'extra-content');
add_action('admin_init', 'wysiwyg_register_meta_box');
function wysiwyg_register_meta_box(){
add_meta_box(WYSIWYG_META_BOX_ID, __('WYSIWYG Meta Box', 'wysiwyg'), 'wysiwyg_render_meta_box', 'post');
}