How to change your command line prompt

Your command line welcomes you with a prompt. Default OSX terminal may look like this. PS1 is the variable used by your shell to determine your command line prompt RPS1 determines your right hand prompt. Note, you can always `echo` this variable to see what these are currently set to. By default, mine is set to…

UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xf1 in position 4: invalid continuation byte

TLDR: Convert your problem file with Sublime Text by opening the file and using “Save with encoding” as utf-8. Alternatively, use iconv -t UTF-8//TRANSLIT -c Zip_Zhvi_SingleFamilyResidence.csv > new_file.csv When does this error happen? I wanted to parse the housing data from Zillow at their research page. Zip code is a great measure of single family home…

Save time: npm install nodemon

Nodemon will allow you to start your node.js project and make changes without manually shutting down and restarting your server. Many people are scared of installing nodemon globally, so here’s a guide to install nodemon locally in your node.js project. Step 1: Install nodemon  $ npm install nodemon –save-dev Step 2: Update your npm scripts…

Sublime Text shortcut on command line (subl)

TLDR: Create a ~/bin directory and symlink the Sublime command: mkdir ~/bin ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl ~/bin/subl Note: if ~/bin is not in your $PATH, add it to your zshrc or bash_profile: echo ‘# add ~/bin to path for scripts like subl\nPATH=$PATH:~/bin’ >> ~/.zshrc && source ~/.zshrc The Sublime Text documentation “OS X Command Line”…

How to publish an npm module

Step 0: You need some code to share. Create a new Github repo or choose one you currently want to publish Here is the command line argument to create a repo called “adder” $ curl -u <your_username> https://api.github.com/user/repos -d “{\”name\”: \”adder\”}” Once you have chosen a Github repo clone it Step 1: Create a proper…