Skip to content

Instantly share code, notes, and snippets.


Tuan Nguyen Anh anhtuank7c

Block or report user

Report or block anhtuank7c

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View DashboardController.php
namespace App\Controller\Admin;
use App\Controller\AppController;
use App\Controller\CheckProfile;
* Dashboard Controller
View CheckProfile.php
namespace App\Controller;
use App\Event\CheckProfileListener;
use Cake\Event\Event;
* CheckProfile trait
trait CheckProfile {
View Ví dụ về code block
//Lưu ý: Việc cái nào nhúng vào cái nào chỉ là cách mình nói về 2 kiểu viết này
//1. nhúng php vào html
<?php foreach($products as $product):?>
<div class="product">
<h3 class="title"><?= $product->title?></h3>
<div class="content">
<p><?= $product->content?></p>
anhtuank7c / index.html
Created Feb 12, 2016
Demo jquery support Izwebz group facebook
View index.html
<!DOCTYPE html>
<script src=""></script>
<script src=""></script>
View DeleteExpiredInactiveAccountTask
namespace App\Shell\Task;
use Cake\Console\Shell;
use Cake\Core\Configure;
use Cake\ORM\TableRegistry;
* DeleteExpiredInactiveAccountTask
View PostActiveListener.php
namespace App\Event;
use Cake\Event\Event;
use Cake\Event\EventListenerInterface;
class PostActiveListener implements EventListenerInterface
View Cấu hình TiniMCE với Responsive Filemanager
forced_root_block: false,
relative_urls: false,
mode: "exact",
elements: "content",
theme: "modern",
height: 300,
plugins: ["advlist autolink link image lists charmap preview hr anchor pagebreak", "searchreplace wordcount visualblocks visualchars insertdatetime media nonbreaking", "table contextmenu directionality emoticons paste textcolor responsivefilemanager fullscreen"],
toolbar1: "undo redo | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | styleselect",
toolbar2: "| responsivefilemanager | link unlink anchor | image media | forecolor backcolor | fullscreen preview code ",
View TinyMCEWidget.php
namespace App\View\Widget;
use Cake\Core\Configure;
use Cake\I18n\I18n;
use Cake\View\Form\ContextInterface;
use Cake\View\Widget\BasicWidget;
* Input widget class for generating a textarea control.
View nginx
server {
listen 80;
# root directive should be global
root /var/www/;
index index.php;
access_log /var/www/;
error_log /var/www/;
anhtuank7c / subdomain.your_domain.conf
Last active Mar 24, 2016
Demo config apache virtual host
View subdomain.your_domain.conf
<VirtualHost *:80>
DocumentRoot /var/www/
# your folder /var/www/
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
DirectoryIndex index.php index.html
AllowOverride All
You can’t perform that action at this time.