[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]
by Aqsa Rasool via Digital Information World
"Mr Branding" is a blog based on RSS for everything related to website branding and website design, it collects its posts from many sites in order to facilitate the updating to the latest technology.
To suggest any source, please contact me: Taha.baba@consultant.com
I spend a lot of my day in the terminal, and my shell of choice is Zsh — a highly customizable Unix shell that packs some very powerful features. As I’m a lazy developerTM, I’m always looking for ways to type less and to automate all the things. Luckily this is something that Zsh lends itself well to.
In this post, I’m going to share with you 75 commands, plugins, aliases and tools that will hopefully save you some keystrokes and make you more productive in your day-to-day work.
If you don't have Zsh installed on your machine, then check out this post, where I show you how to get up and running.
Zsh shares a lot of handy features with Bash. None of the following are unique to Zsh, but they're good to know nonetheless. I encourage you to start using the command line to perform operations such as those listed below. It might seem like more work than using a GUI at first, but once you get the hang of things, you'll never look back.
cd from anywhere on the file system will bring you straight back to your home directory.!! will bring up the last command. This is handy if a command fails because it needs admin rights. In this case you can type sudo !!.&& to chain multiple commands. For example, mkdir project && cd project && npm init -y.||. For example, git commit -m "whatever..." || echo "Commit failed".-p switch with the mkdir command will allow you to create parent directories as needed. Using brace expansion reduces repetition. For example, mkdir -p articles/jim/sitepoint/article{1,2,3}.NODE_DEBUG=myapp node index.js. Or, on a per-session basis like so: export NODE_DEBUG=myapp. You can check it was set by typing echo $<variable-name>.cat /var/log/kern.log | less to make a long log readable, or history | grep ssh to search for any history entries containing "ssh".nano ~/.zshrc (nano), subl ~/.zshrc (Sublime Text), code ~/.zshrc (VS Code). If the file doesn't exist, it will be created when you press Save in the editor.Try to commit those key combos to memory. You'll be surprised at how often they come in handy.
Aliases are terminal shortcuts for regular commands. You can add them to your ~/.zshrc file, then reload your terminal (using source ~/.zshrc) for them to take effect.
The syntax for declaring a (simple) alias is as follows:
alias [alias-name]='[command]'
Aliases are great for often-used commands, long commands, or commands with a hard-to-remember syntax. Here are some of the ones I use on a regular basis:
myip alias, which prints your current public IP address to the terminal: alias myip='curl http://ipecho.net/plain; echo'.distro alias to output information about your Linux distribution: alias distro='cat /etc/*-release'.reload alias, as I can never seem to remember how to reload my terminal: alias reload='source ~/.zshrc'.undo-git-reset alias: alias undo-git-reset-head="git reset 'HEAD@{1}'". This reverts the effects of running git reset HEAD~.alias sapu='sudo apt-get update'.sudo: alias ffs='sudo !!'.y to the yarn command: alias y='yarn'. This means I can clone a repo, then just type y to pull in all the dependencies. I learned this one from Scott Tolinski on Syntax.node_modules folder and removes the package-lock.json file, before reinstalling a project's dependencies: alias yolo='rm -rf node_modules/ && rm package-lock.json && yarn install'. As you probably know, yolo stands for You Only Live Once..zshrc file for editing: alias zshconfig='subl $HOME/.zshrc'.alias update-available-rubies='cd ~/.rbenv/plugins/ruby-build && git pull'alias server='python -m SimpleHTTPServer 8000'.alias npmhelp='firefox https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/npm'.less: alias -g L='| less'. You can use it like so: cat production.log L.grep: alias -g G='| grep'. You can use it like so: history G ssh.bash
function acp() {
git add .
git commit -m "$1"
git push
}
There are lots of places to find more ideas for aliases online. For example, this Hacker News discussion, or this post on command line productivity with Zsh.
The post 75 Zsh Commands, Plugins, Aliases and Tools appeared first on SitePoint.
Are you running LinkedIn ads? Wondering how your ads are performing against industry standards? In this article, you’ll discover how to assess your LinkedIn ad campaigns. 4 Important LinkedIn Ad Metrics Explained One of the biggest challenges with running LinkedIn ads is knowing whether your performance measures up. Competent marketers ask me all the time, […]
The post How to Analyze Your LinkedIn Ad Performance appeared first on Social Media Marketing | Social Media Examiner.
Lovely clean design (with a great choice of icons I might add!) in this Landing Page for the Crafting Emails service.