Skip to content

Instantly share code, notes, and snippets.

@trungpv93
trungpv93 / README.md
Created January 15, 2017 09:06
Composer: Cài những package mà bạn fork từ Github

Composer: Cài những package mà bạn fork từ Github

{
    "repositories":
    [
@trungpv93
trungpv93 / Download youtube mp3
Created October 20, 2016 16:16
Download youtube mp3
youtube-dl --extract-audio --audio-format mp3 "link"
@trungpv93
trungpv93 / gist:81ae2a89c83338fe123634659601dc2f
Created October 20, 2016 09:11
How To Compress AVI and MP4 Video Files With FFmpeg - Ubuntu/Debian
ffmpeg -i input.avi -vcodec msmpeg4v2 output.avi
ffmpeg -i input.mp4 -acodec mp2 output.mp4
@trungpv93
trungpv93 / gist:5c094d69b560823fba38e2a810c8d8a1
Created October 19, 2016 07:39
Fix issue Select2 in Modal Bootstrap
//Fix Select2 In Modal
$.fn.modal.Constructor.prototype.enforceFocus = function () {
//Initialize Select2 Elements
$(".select2").select2();
};
@trungpv93
trungpv93 / gulpfile.js
Created October 7, 2016 11:12
AdminLTE Theme for Laravel 5
var elixir = require('laravel-elixir');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Sass
| file for our application, as well as publishing vendor resources.
@trungpv93
trungpv93 / Tiếng việt trong Laravel + SQL Server trên Ubuntu.md
Last active November 2, 2016 09:45
Tiếng việt trong Laravel + SQL Server trên Ubuntu
  • Cài đặt FreeTDS

$ apt-get install libsybdb5 freetds-common php5-sybase

  • Thêm cấu hình trong config/database.php trong Laravel 5
'sqlsrv' => [
            'driver' => 'sqlsrv',
 'host' => env('DB_HOST', 'localhost'),
@trungpv93
trungpv93 / Microsoft SQL Server 環境の構築.md
Created October 5, 2016 09:35 — forked from yuga/Microsoft SQL Server 環境の構築.md
WindowsにSQL Server 2012 Expressをインストールして、Linux上のHaskellからODBCで接続できるようになるまで。

Microsoft SQL Server 環境の構築

  • Server: Widnwos & SQL Server
  • Client: Linux

Microsoft SQL Server 2012 Express のインストール方法

apm install minimap minimap-cursorline emmet double-tag atom-beautify autoclose-html highlight-selected code-peek remote-sync seti-ui seti-syntax
@trungpv93
trungpv93 / mail-setup.sh
Last active December 10, 2019 07:30
Install Postfix, Dovecot, RoundCube on Ubuntu 14.04
#!/usr/bin/env bash
ESC_SEQ="\x1b["
COL_RESET=$ESC_SEQ"39;49;00m"
COL_RED=$ESC_SEQ"31;01m"
COL_GREEN=$ESC_SEQ"32;01m"
COL_YELLOW=$ESC_SEQ"33;01m"
DOMAIN="xxx.vn"
PASS_DB_ROUNDCUBE="xxx"
cd ~
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
composer create-project --prefer-dist laravel/laravel laravel
sudo chown -R :www-data laravel
sudo chmod -R 775 laravel/storage