Skip to content

Instantly share code, notes, and snippets.

@NguyenTrungTin
NguyenTrungTin / 20thingsilearned.min.js
Last active September 12, 2015 19:00
20thingsilearned.min.js
/*
* jQuery JavaScript Library v1.4.2
* http://jquery.com/
*
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
@NguyenTrungTin
NguyenTrungTin / 20thingsilearned.js
Last active February 21, 2016 18:37
20thingsilearned.js
/*
Nice to study. Original here http://www.20thingsilearned.com/js/twentythings.min.js
*/
var TT = TT || {};
TT.PAGE_WIDTH = 800;
TT.PAGE_HEIGHT = 500;
TT.PAGE_MIN_WIDTH = 1000;
TT.PAGE_MIN_HEIGHT = 680;
TT.PAGE_MARGIN_LEFT = 32;
@NguyenTrungTin
NguyenTrungTin / Perfect-FullScreen-BackGround.css
Last active March 27, 2016 16:46
Perfect FullScreen BackGround by CSS
img.bg {
/* Set rules to fill background */
min-height: 100%;
min-width: 1024px;
/* Set up proportionate scaling */
width: 100%;
height: auto;
/* Set up positioning */
@NguyenTrungTin
NguyenTrungTin / SSH Key.md
Created May 14, 2018 09:52
Create new SSH key

Generate new ssh key

$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

Start the ssh-agent in the background.

@NguyenTrungTin
NguyenTrungTin / Laravel Clear Cache.sh
Last active November 1, 2018 10:37
Clear Laravel Cache
# Clear Laravel Cache Using PHP Artisan after Deploying
```bash
php artisan optimize
php artisan cache:clear
php artisan route:cache
@NguyenTrungTin
NguyenTrungTin / SSH-config.md
Created May 14, 2018 09:58
Config for AWS server when get the error: Permission denied (Public key)

Config for AWS server when get the error: Permission denied (Public key)

Host gitlab.com
  HostName gitlab.com
  User git
  IdentityFile ~/.ssh/id_rsa
  AddKeysToAgent yes
 
@NguyenTrungTin
NguyenTrungTin / linux copy without hidden files.sh
Created May 14, 2018 10:02
Linux copy without hidden files
rsync -av --exclude=".*" src dest

Change permission from root to users

sudo chown ec2-user -R <folder>
  1. Remove all .DS_Store on current git directory
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
  1. After done 1 step, add .DS_Store in .gitignore

Git - Replace master branch, entirely, from development branch

  1. You should be able to use the "ours" merge strategy to overwrite master with seotweaks like this:
git checkout development
git merge -s ours master
git checkout master
git merge development