# change the default editor from vim to nano
git config --global core.editor "nano"
git blame -L306,+20 client/apps/Manage/Campaign/components/Form/Targeting/index.js
# as with any unix command, you can move the parameters to the end
# i always do it for the sake of conveniences
# because editing the line numbers, this way, becomes very easy
git blame client/apps/Manage/Campaign/components/Form/Targeting/index.js -L 306,326
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 PATH=/usr/local/bin:$PATH | |
export PATH=/usr/bin:$PATH | |
export PATH=/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin:$PATH | |
export PATH=/Applications/Sublime\ Text.app/Contents/SharedSupport/bin:$PATH | |
export PATH=$HOME/mongodb/bin:$PATH | |
export PATH=$HOMEredis/src:$PATH | |
export PATH=$HOME/apache-tomcat-8.0.36/bin:$PATH | |
export PATH=$HOME/apache-maven-3.3.9/bin:$PATH | |
# if you are using nvm, you will have to |
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
// just truncate the array's length: | |
const myArray = [1, 2, 3]; | |
myArray.forEach(item => { | |
// ... do some stuff | |
if(someConditionIsMet) { | |
// Break out of the loop by truncating array | |
myArray.length = 0; | |
} | |
}) |
Run: ~/.local/share/kite/uninstall
- Uninstall all editor plugins - uninstall the editor plugins Kite has installed, instructions here: https://help.kite.com/article/62-managing-editor-plugins
- Quit Kite - You can do so from the menu bar icon. If you don't have the menu bar icon shown, you can manually close all the Kite processes.
(works on ubuntu 16.04 or later which use systemd
)
- start -
sudo service postgresql start
- stop -
sudo service postgresql stop
- restart -
sudo service postgresql restart
- auto launch -
sudo systemctl enable postgresql
- disable auto launch -
sudo systemctl disable postgresql
- start -
sudo service apache2 start
- stop -
sudo service apache2 stop
- restart -
sudo service apache2 restart
- enable auto launch -
sudo systemctl enable apache2
- disable apache2 auto launch -
sudo systemctl disable apache2
how to determine programmatically, may be in a shell script, which branch you're on (without using git branch
)
git rev-parse --abbrev-ref HEAD
more: https://bigfatsoftwareinc.wordpress.com/2021/01/25/how-to-determine-which-git-branch-youre-on/
git log --format=%B -n 1 <revision>
git log --format=%B -n 1 HEAD