Git: Fix warning: unable to access '/.config/git/ignore': Permission denied
After I check the folder, I just know that the folder owned by “root” user.
ls -lah
sudo chown whoami .config
How to Stop DS_Store File Creation on Network Volumes in Mac OS X
To disable the creation of .ds_store files, launch the Terminal application from /Applications/Utilities/ and enter the following command string exactly:
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
How to Lock the Mac Screen from Terminal in OS X
Open Terminal and enter the following in a single line:
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
A Beautifully Productive Terminal Experience iTerm, Oh-My-Zsh
Every developer can benefit from using the command line. Whether you use it to bounce between projects or create complex scripts, getting familiar with the command line can drastically improve your workflow.
In this post, we’ll cover some of the great tools available for streamlining your command line experience.
How to install powerlevel10k/powerlevel10k shell: https://gist.github.com/kevin-smets/8568070
After some experimenting, I’ve found that using a combination of iTerm 2, Oh-My-ZshZsh, Prezto, Z, Trash & Origami for Sublime Text - makes for an extremely productive setup.
How to customize the Terminal on your Mac
I love the terminal. Besides the fact it makes you look awesome while using it.
What we will be making
Oh My Zsh is installed by running one of the following commands in your terminal. You can install this via the command-line with either curl or wget.
[solved] How to configurate aliases in Sublime Text
Use Terminal and run commands
subl ~/.zshrc
then we can add commands:
# In line 88 change aliases text: # Example aliases # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" alias db="cd ~/Dropbox/" alias doc="cd ~/Documents/" alias zs="subl ~/.zshrc" alias gum="git pull upstream master"
Profit!
[solved] How To Delete Mail from Terminal in macOS
If you show message in terminal “You have mail” you can delete all messages
sudo rm /var/mail/<your-username>
If you want send mail via terminal use commands:
mail -s "hello" "[email protected]" <<EOF hello world EOF
You can access the mail by simply using the command
[solved] How To Open Sublime Text from Terminal in macOS
Solution : At first , run following script on Terminal app to create specific symlink.
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
Then,
subl .
Hit return, it should instantly pop-up Sublime app.
How to enable Tab Completion in Mac OS X Terminal
Launch Terminal and be in the home directory to get started:
- Using emacs, nano, vi, or whatever your favorite text editor is to edit .inputrc, we’ll use nano for the walkthrough:
nano .inputrc
- Paste in the following three rules on unique lines:
set completion-ignore-case on
set show-all-if-ambiguous on
TAB: menu-complete
- Hit Control+O to save changes to .inputrc followed by control+X to quit
- Open a new Terminal window or tab, or type “login” to open a new session with the rules in effect
- Start typing a command, path, or something else and hit the Tab key to see the improvements firsthand