Skip to content

Instantly share code, notes, and snippets.

View tuanpht's full-sized avatar
💭
200 OK!

Pham Tuan tuanpht

💭
200 OK!
View GitHub Profile
@tuanpht
tuanpht / tmux-cheatsheet.markdown
Created April 27, 2021 01:16 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@tuanpht
tuanpht / php-artisan-bash-completion.md
Last active June 7, 2023 07:42 — forked from jhoff/README.md
Bash-only Laravel Artisan tab auto-complete

If you are an Oh-my-zsh user, see the Laravel 5 plugin

For the rest of us Bash users, all of the Laravel Artisan autocomplete solutions out there require installing a composer package to get a list of artisan commands. Turns out this isn't really necessary. Simply add the provided code in ~/.bash_profile ( or similarly sourced file ) and you'll get artisan command tab completes on any project on your system.

_artisan()
{
    local arg="${COMP_LINE#php }"

    case "$arg" in
@tuanpht
tuanpht / laravel-quickstart-project-docker.md
Created June 21, 2018 07:05 — forked from wataridori/laravel-quickstart-project-docker.md
Running Laravel Quick Start Project easily using Docker
  • Install Docker
    • Docker for Ubuntu: https://docs.docker.com/engine/installation/linux/ubuntulinux/
      sudo apt-get update && apt-get install -y apt-transport-https ca-certificates
      sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
      
      // Open the /etc/apt/sources.list.d/docker.list and add the following line then save it
      // Ubuntu 14.04
      deb https://apt.dockerproject.org/repo ubuntu-trusty main
      

// Ubuntu 16.04

@tuanpht
tuanpht / config.diff
Created April 5, 2017 03:08 — forked from westonruter/config.diff
Using colordiff for my svn diff command (set in ~/.subversion/config)
@@ -28,7 +28,7 @@
### Set diff-cmd to the absolute path of your 'diff' program.
### This will override the compile-time default, which is to use
### Subversion's internal diff implementation.
-# diff-cmd = diff_program (diff, gdiff, etc.)
+diff-cmd = colordiff
### Set diff3-cmd to the absolute path of your 'diff3' program.
### This will override the compile-time default, which is to use
### Subversion's internal diff3 implementation.
@tuanpht
tuanpht / angularjs-providers-explained.md
Last active August 26, 2016 07:21 — forked from demisx/angularjs-providers-explained.md
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant