Skip to content

Instantly share code, notes, and snippets.

@ranraj
Last active May 26, 2020 05:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ranraj/52ce14cfa119f42055562451dcf04966 to your computer and use it in GitHub Desktop.
Save ranraj/52ce14cfa119f42055562451dcf04966 to your computer and use it in GitHub Desktop.
blogs_post2.md

Keep these below files in a webserver or create live-server,express to keep this application running

npm install global live-server

public/index.html

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>my wish list</title>
    </head>
    <body>
        <div id="app"></div>
        <script src="https://unpkg.com/react@16/umd/react.development.js"></script>
        <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
        <script src="/scripts/app.js"></script>
    </body>
</html>

/public/scripts/app.js

let template = React.createElement('h1', null, 'Welcome to react');
appRoot = document.getElementById("app");
ReactDOM.render(template, appRoot);

Every day all you geeks are typing 'cd' command more than like any another command.

As you want to navigate to move almost nuke and corner of your file system.

But sometimes you often go to a specific folder, maybe that is Downloads or you specific workspace folder.

~ cd ~/Downloads
➜  Downloads

As this is very near to home folder and shot, it is easy to navigate but what if you have project specific folder that that has 100 character length path. Alias is useful to set shortcut command for your folders.

Edit your shell source file by doing the following command in terminal

vi ~/.zshrc

or

vi ~/.bash_profile

Update below content into the bottom of your source file ,

#Alias to my Download folder
alias downloads='cd ~/Downloads'

Save the profile file by doing vi save (escape + :wq!)

➜  downloads

Now type downloads in your terminal hit enter. You are into the Downloads folder.

Note : Restart the terminal if not working, or check the typo to your profile settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment