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…
All posts in Coding
Todidlist.com started as a vim shortcut
Hi all! Todidlist.com started as a vim shortcut that I wrote about way back last year here. I wanted to have the most accessible “did list” and vim served me so so well. However, once I got a new computer, I realized that my did list was missing a key feature: ubiquity. There was one…
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 does sequelize pluralize?
If you use .sync with sequlize and have a model name like User, your database ends up with a table called Users. More clearly, when you use the sequelize-cli model generator the generated file will show this pluralized table. Here is the code: (link) What is Utils? * Note Sequelize has a directory called Utils AND a file…
Setting environment variables
How to see and set your environment variables Print all your current environment variables with $ printenv See a the value for a specific variable with echo $ printenv <YOUR_VARIABLE> or $ echo $<YOUR_VARIABLE> For example: $ printenv MY_API_KEY or $ echo $MY_API_KEY How do I set the variable temporarily? This will set your variable for ONLY…
what is curl?
curl is tool to transfer data from or to a server, using one of the supported protocols (HTTP, HTTPS, FTP, POP3 etc) What can I do with curl? You can get the weather: $ curl https://wttr.in You can download hacker news $ curl https://news.ycombinator.com/ You can read a file from Github $ curl https://raw.githubusercontent.com/facebook/react/master/README.md You can even…
What if we build a knowledge map?
What is a core unit of knowledge? Can you map out a graph of competence based on individual nodes of ability? What does it take to implement a merge sort? Unit: Have a computer Unit: install a programming language Unit: download a text editor Unit: know how to type … etc, etc, This can possibly…
did.txt file
Goal: create an insanely simple “did” file accessible by terminal Time flies by when you’re learning how to code. Its super important to take a second every once in a while to simple write down what you did during the past mental sprint. Writing down what you learned solidifies the knowledge. Cue the did.txt file…
Who is the keyword “this”?
`this` – NBA Edition The keyword `this` is a difficult javascript topic that has been debated and pondered over for centuries – more or less. Its meaning is ambiguous at first glance mainly because what the keyword `this` refers to changes depend on where it is called. Here we explore some of the various ways…
LA Hacks
The event was billed as the largest hackathon on the West Coast and is the only one I know of that lasted both Friday and Saturday night. 36 hours of coding and the list of suggested items included, at the top, a laptop and a sleeping bag. At first I was hesitant to sign…