Skip to content

Instantly share code, notes, and snippets.

View tranghaviet's full-sized avatar

Ha Viet Trang tranghaviet

View GitHub Profile
@tranghaviet
tranghaviet / CrossPlatGit.md
Last active August 15, 2019 08:09
Git config for cross platform line endings
@tranghaviet
tranghaviet / gist:d8e7651ce0ae585254cfd90bd41615b0
Created December 17, 2017 13:30 — forked from alekpopovic/gist:ce3635c7e29596e6f65154b1785e5ef9
Installing Laravel 5.2 on Ubuntu 16.04 and Apache2
Installing Laravel 5.2 on Ubuntu 16.04 and Apache2
This post will document how I installed Laravel 5.2, on Apache2 on an Ubuntu 16.04 server. Will will also install MySQL, as we will need a database, and PHP which is required by Laravel. This will be the starting point of most of my posts, so if you’re following along from scratch…this is “scratch!”
First thing you need, of course, is the Ubuntu 16.04 server, with an SSH connection. Follow these excellent instructions and get yourself sorted out with one. Make sure you also give the server a static IP address (step 8., in the linked instructions). Come back when you’re done.
Welcome back! Lets get started.
@tranghaviet
tranghaviet / laravel
Created November 14, 2017 09:04 — forked from Repox/laravel
Laravel logrotate configuration (1 daily rotation, 7 days retention)
/home/laravel/app/storage/logs/laravel.log {
daily
missingok
rotate 7
maxage 7
compress
notifempty
create 755 user group
su user group
}
@tranghaviet
tranghaviet / mật khẩu wifi hay dùng tại việt nam.md
Created October 11, 2017 11:46
Danh sách mật khẩu wifi hay dùng tại việt nam

Đây là danh sách mật khẩu wifi mình thấy hay được dùng nhất ( ít nhất 8 kí tự). Bạn nên thử theo thứ tự từ trên xuống. 12345678 123456789 88888888 (phát tài) password khongmatkhau hoilamgi hoilamchi 987654321

@tranghaviet
tranghaviet / fonts.min.css
Last active October 9, 2017 12:54
haviettrang.blogspot.com asset
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:900;src:local('Playfair Display Black'),local('PlayfairDisplay-Black'),url(//fonts.gstatic.com/s/playfairdisplay/v11/UC3ZEjagJi85gF9qFaBgIJDIFf5Wheh9SWCUqp--Vvo.woff2)format('woff2');unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;}@font-face{font-family:'Playfair Display';font-style:normal;font-weight:900;src:local('Playfair Display Black'),local('PlayfairDisplay-Black'),url(//fonts.gstatic.com/s/playfairdisplay/v11/UC3ZEjagJi85gF9qFaBgIJulvK9r9ZyXR2Qi4DVS52A.woff2)format('woff2');unicode-range:U+0100-024F,U+1E00-1EFF,U+20A0-20AB,U+20AD-20CF,U+2C60-2C7F,U+A720-A7FF;}@font-face{font-family:'Playfair Display';font-style:normal;font-weight:900;src:local('Playfair Display Black'),local('PlayfairDisplay-Black'),url(//fonts.gstatic.com/s/playfairdisplay/v11/UC3ZEjagJi85gF9qFaBgIMGhQI7v0ryGuSQ4oDzNyds.woff2)format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2212,U+2215;}@font-f
@tranghaviet
tranghaviet / Add turbolink to boot up speed loading pages.js
Last active September 26, 2024 16:32
Some useful User script can install in Tampermonkey

5 minutes PgAdmin4 Desktop install guide

Done on Linux (Ubuntu tested)

Virtualenv & install of Python package & its deps

cd $HOME
virtualenv --python=/usr/bin/python2.7 pgadmin4
source pgadmin4/bin/activate
@tranghaviet
tranghaviet / yield.rb
Last active July 22, 2017 11:25
Yield in ruby
def calculation(a, b, operation)
operation.call(a, b)
end
puts calculation(5, 6, lambda { |a, b| a + b }) # addition
# OR puts calculation(5, 6, ->(a, b) { a + b })
# OR puts calculation(5, 6, Proc.new{ |a, b| a + b })
# OR puts calculation(5, 6, proc{ |a, b| a + b })
puts calculation(5, 6, lambda { |a, b| a - b }) # subtraction
@tranghaviet
tranghaviet / cloudSettings
Last active August 28, 2019 10:47
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-08-28T10:47:28.910Z","extensionVersion":"v3.4.1"}