Skip to content

Instantly share code, notes, and snippets.

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

Thien Tran duythien

🏠
Working from home
View GitHub Profile
1/https://www.drupal.org/project/backstretch module provide set backgroud full page
2/hook_process_page custom logo any page, etc
3/https://www.drupal.org/project/views_merge_rows
SELECT t.*, tt.*, tr.object_id, p.*
FROM wp_terms AS t
INNER JOIN wp_posts AS p
ON p.id = t.term_id
INNER JOIN wp_term_taxonomy AS tt
ON tt.term_id = t.term_id
INNER JOIN wp_term_relationships AS tr
ON tr.term_taxonomy_id = tt.term_taxonomy_id
WHERE tt.taxonomy IN ('category', 'post_tag', 'post_format')
AND tr.object_id IN (8)
@duythien
duythien / gist:9917340
Created April 1, 2014 16:10
dnscrypt.service
# For more info about custom unit files, see systemd.unit(5) or
# http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F
# For example, if you want to increase mysql's open-files-limit to 10000,
# you need to increase systemd's LimitNOFILE setting, so create a file named
# "/etc/systemd/system/mariadb.service.d/limits.conf" containing:
# [Service]
# LimitNOFILE=10000
@duythien
duythien / gist:9885387
Last active August 29, 2015 13:57
nginx.conf
user www-data;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
# multi_accept on;
}
http {
@duythien
duythien / gist:9666658
Created March 20, 2014 15:40
http.conf
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure