Skip to content

Instantly share code, notes, and snippets.

View sanglt's full-sized avatar
🎯
Focusing

Sang Lê sanglt

🎯
Focusing
View GitHub Profile
upstream redash {
server localhost:5000;
}
server {
listen 80 default;
gzip on;
gzip_types *;
gzip_proxied any;
Về Ung thư…
Cho đến nay nhân loại chưa thể tìm ra nguồn gốc thật sự của ung thư, chỉ có thể chỉ ra một số tác nhân có thể dẫn đến căn bệnh này. Nhưng kỳ lạ thay, lều báo Việt Nam lại làm được điều ấy, đã có những con kền kền dã tâm đánh vào sự hoang mang của đồng loại đối với căn bệnh đáng sợ này, dẫn đến hiện trạng suốt thập kỷ qua ung thư tràn lan mặt báo: uống nước sôi để nguội cũng ung thư, hít thở cũng ung thư, ăn rau cũng ung thư, ăn đậu phụ cũng ung thư, ăn chân gà cũng ung thư…
Bọn kền kền bất lương đã tạo nên một ma trận mà mọi ngã đường chúng đưa ra đều có thể dẫn đến ung thư.
Ung thư là gì?
Trong công ty, có đứa không làm việc, ngồi lê đôi mách hết chỗ này đến chỗ khác, phá hoại nội bộ dẫn đến hình thành những bè cánh, phe phái. Cơ chế ung thư cũng như thế, Ung thư là một nhóm các bệnh liên quan đến việc phân chia tế bào một cách vô tổ chức, tế bào này sinh trưởng chen lên tế bào kia, rồi chạy lung tung trong cơ thể (ta hay gọi là di căn).
Việt Nam ở đâu trên bản đồ ung thư thế giới?
@sanglt
sanglt / restler.patch
Last active October 17, 2016 06:21
restler.patch
diff --git a/vendor/luracast/restler/vendor/Luracast/Restler/Restler.php b/vendor/luracast/restler/vendor/Luracast/Restler/Restler.php
index 0cef46a..ea6592e 100644
--- a/vendor/luracast/restler/vendor/Luracast/Restler/Restler.php
+++ b/vendor/luracast/restler/vendor/Luracast/Restler/Restler.php
@@ -1166,13 +1166,9 @@ class Restler extends EventDispatcher
: 'Unknown';
@header('WWW-Authenticate: ' . $authString, false);
}
+ echo $this->responseData;
$this->dispatch('complete');
FROM php:7-apache
RUN pecl install xdebug && docker-php-ext-enable xdebug && echo "xdebug.remote_host=10.254.254.254\nxdebug.remote_enable=1\nxdebug.remote_autostart=1" >> /usr/local/etc/php/conf.d/xdebug.ini
@sanglt
sanglt / htaccess_patch_for_file_and_private_folder.patch
Created October 12, 2015 07:36
Add patch to .htacces of files + private folder
diff --git a/includes/file.inc b/includes/file.inc
index d209e0a..640e7a7 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -530,6 +530,61 @@ SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
+# BEGIN Compress text files
+<ifModule mod_deflate.c>
root@bmcom:/etc/bind# named-checkconf /etc/bind/named.conf.local
root@bmcom:/etc/bind# named-checkzone businessmention.com /etc/bind/for.businessmention.com
zone businessmention.com/IN: loaded serial 2
OK
root@bmcom:/etc/bind# dig businessmention.com @104.236.29.216
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> businessmention.com @104.236.29.216
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48707
@sanglt
sanglt / hhvm 3.6.1
Last active August 29, 2015 14:19
PHPUnit 4.4.2 Durpal 8 alpha 9
sanglt@ubuntu:~/oss/drupal-8.0.0-beta9/core$ php -v
HipHop VM 3.6.1 (rel)
Compiler: tags/HHVM-3.6.1-0-gc051feff88ba8050f33f10f7b1fb07f8d3415f9e
Repo schema: 42f49251b5c27daf4e13cb6bcd0c7ef4824b55a3
sanglt@ubuntu:~/oss/drupal-8.0.0-beta9/core$ ~/phpunit-4.4.2/phpunit
PHPUnit 4.4.2 by Sebastian Bergmann.
Configuration read from /home/sanglt/oss/drupal-8.0.0-beta9/core/phpunit.xml.dist
............................................................. 61 / 7587 ( 0%)
@sanglt
sanglt / result
Created April 13, 2015 07:15
PHP 5.5.22 Drupal 7.36
sanglt@ubuntu:~/oss/drupal-7.36$ php scripts/run-tests.sh --all --concurrency 4 --color --url http://drupal736.local
Drupal test run
---------------
All tests will run.
Test run started:
Monday, April 13, 2015 - 06:20
SELECT /*+ NOPARALLEL bypass_recursive_check */
SP_ALIAS_190,
((CASE SP_ALIAS_191
WHEN 1
THEN 'PROVIDER::ALL_PROV::'
WHEN 0
THEN 'PROVIDER::PROV::'
ELSE NULL END) || SP_ALIAS_190) ALIAS_3553,
SP_ALIAS_194,
SP_ALIAS_191,
@sanglt
sanglt / purl_item_edit_validate_fix.patch
Created January 9, 2015 03:24
Error : Call to undefined function purl_item_edit_validate()
diff --git a/purl.module b/purl.module
index 955b989..141ad10 100644
--- a/purl.module
+++ b/purl.module
@@ -98,7 +98,7 @@ function purl_form_alter(&$form, &$form_state, $form_id) {
case 'menu_edit_menu':
case 'menu_edit_item':
case 'redirect_edit_form':
- module_load_include('inc', 'purl', 'purl.admin');
+ form_load_include($form_state, 'inc', 'purl', 'purl.admin');