This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## FOR MAC | |
- install `font-hack-nerd-font` | |
- brew install font-hack-nerd-font | |
- Go to iterm2 setting | |
- select `Profiles` tab | |
- select `Text` tab | |
- check `Use a different font for non-ASCII text` | |
- search and select `Hack Nerd Font` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Create virtual env with python `python -m venv my_venv` | |
- Install required virtual env for target python version | |
- For eg: if python version is 3.9 | |
- `sudo apt-get install python3.9-venv` | |
- Change python version for your virtual env | |
- `virtualenv --python="{{path to target python}}" "/path/to/new/virtualenv/"` | |
- `virtualenv --python="/usr/bin/python3.9" "{{my_venv}}" | |
- update your python version in cloudformation file and Pipfile | |
- amplify push |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
server_name mydomain.com; | |
charset utf-8; | |
root /var/www/html/{Laravel_Project_DIR}/current/public; | |
index index.html index.php; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lsof -P | grep ':PortNumber' | awk '{print $2}' | xargs kill -9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copy the following script in your .zshrc file | |
# Fix permission for zsh. It should be on the first line to work. | |
export ZSH_DISABLE_COMPFIX=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const removeEmptyOrUndefined = (obj: any) => { | |
let finalObj: any = {}; | |
Object.keys(obj).forEach((key) => { | |
if (obj[key] && typeof obj[key] === 'object') { | |
const nestedObj = removeEmptyOrUndefined(obj[key]); | |
if (Object.keys(nestedObj).length) { | |
finalObj[key] = nestedObj; | |
} | |
} else if (obj[key] !== '' && obj[key] !== undefined && obj[key] !== null) { | |
finalObj[key] = obj[key]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by | |
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
2. chsh -s $(which zsh) | |
3. change ZSH_THEME="agnoster" or any other theme of your preference in ~/.zshrc file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prefix for the following commands: Ctrl + B | |
1) New window: "+ C" | |
2) Switch window : "+ (window number)" | |
3) Next window: "+ n" | |
4) Previous window: "+ p" | |
5) Rename window: "+ ," | |
6) View windows: "+ w" | |
7) Horizontal split: "+ %" | |
8) Vertical split: "+ "" | |
9) Detatch from session: "+ d" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- ssh root@<ubuntu-server-ip-address> | |
To start with, connect to your Ubuntu Server with SSH with root | |
`ssh root@<ubuntu-server-ip-address>` | |
Once you are logged in to your server with root, | |
you are ready to create the new deploy user that will be used from now on. To do that, type: | |
` adduser deploy ` | |
Update deploy user privileges, by: | |
`usermod -aG sudo deploy` |
NewerOlder