Skip to content

Instantly share code, notes, and snippets.

View lamngockhuong's full-sized avatar
🍊
Working

Lâm Ngọc Khương lamngockhuong

🍊
Working
View GitHub Profile
@lamngockhuong
lamngockhuong / exceptions-tree.php
Last active July 7, 2018 06:49
Throwable and Exceptions tree
<?php
if (!function_exists('interface_exists')) {
die('PHP version too old');
}
$throwables = listThrowableClasses();
$throwablesPerParent = splitInParents($throwables);
printTree($throwablesPerParent);
@lamngockhuong
lamngockhuong / README.md
Last active May 16, 2018 03:59
[Eclipse Shortcut for Ubuntu Unity] - ubuntu, java, eclipse

Eclipse Shortcut for Ubuntu Unity

a shortcut to run Eclipse on Ubuntu Unity and to register Eclipse with the left Launcher

Installation

@lamngockhuong
lamngockhuong / node.md
Last active June 12, 2019 15:17
[Install Java 10 on Linux] - ubuntu, java 10, jdk

Option 1: Easy Installation (PPA)

sudo add-apt-repository ppa:linuxuprising/java
sudo apt-get update
sudo apt-get install oracle-java10-installer

Option 2: Manual Installation

  • Download [OpenJDK 10][1] binaries for Linux.
@lamngockhuong
lamngockhuong / user-settings.md
Created March 13, 2018 03:08
[VS Code - My User Settings] user settings helpful #vscode
{
    "phpformatter.composer": true,
    "workbench.startupEditor": "newUntitledFile",
    "workbench.iconTheme": "material-icon-theme",
    "editor.multiCursorModifier": "alt",
    "editor.snippetSuggestions": "top",
    "editor.formatOnPaste": true,
    "window.menuBarVisibility": "toggle",
 "window.zoomLevel": 0,
@lamngockhuong
lamngockhuong / note.md
Created March 1, 2018 04:46
[Laravel chown when run on Apache2] #apache2 #laravel #chown
sudo chown -R {your current user}:www-data storage
sudo chown -R {your current user}:www-data bootstrap/cache

example:

sudo chown -R ngockhuong:www-data storage
sudo chown -R ngockhuong:www-data bootstrap/cache
@lamngockhuong
lamngockhuong / note.md
Created February 27, 2018 07:24
[Mount disk command for NTFS partitions] #ubuntu #linux

For NTFS partitions, use the permissions option in fstab. First unmount the ntfs partition. Identify your partition UUID with blkid

sudo blkid

Then edit /etc/fstab

# Graphical 
gksu gedit /etc/fstab
@lamngockhuong
lamngockhuong / note.md
Created February 27, 2018 07:03
[Deploy Laravel application on ubuntu with apache2] #laravel #ubuntu #apache2

Create conf file for virtual domain

sudo nano /etc/apache2/sites-available/laravel.conf

Then copy and paste the content below into the file and save it:

<VirtualHost *:80>   
  ServerAdmin [email protected]
     DocumentRoot /var/www/laravel/public
 ServerName example.com
@lamngockhuong
lamngockhuong / note.md
Created February 27, 2018 03:54
[View File Permission Linux] #linux #ubuntu #permission
$ getfacl directory
@lamngockhuong
lamngockhuong / ckfinder-authentication-configuration-for-laravel.md
Created February 6, 2018 16:04
[CKFinder Authentication Configuration for laravel 5] #laravel #ckfinder #ckeditor

Open and edit file 'ckfinder/config.php':

require dirname(__DIR__, 3) .'/vendor/autoload.php';
$app = require dirname(__DIR__, 3) . '/bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$kernel->handle($request = Illuminate\Http\Request::capture());

$config['authentication'] = function () {
 if (auth()-&gt;guest()) {
@lamngockhuong
lamngockhuong / vscode-extension.md
Created January 28, 2018 09:04
[Visual Studio Code Extensions for Developer] #vscode #extension

1. Auto Close Tag

Tự động thêm thẻ đóng cho HTML, cụ thể nó có những tính năng như sau:

*Tự động thêm thẻ đóng khi bạn gõ dấu > của thẻ mở.
*Sau khi chèn thẻ đóng, con trỏ chuột nằm giữa thẻ mở và thẻ đóng, thuận tiện cho việc add thêm content vào đó.
*Thiết lập danh sách các thẻ mà sẽ không được tự động đóng.
*Tự động đóng cho những thẻ self-closing.
*More...

2. Auto Rename Tag