Keith Yap

Things I've Learnt



Remote login to Heroku

Open terminal, navigate to project folder, assume Heroku CLI and Git installed heroku loginheroku git:remote -a ‘name of heroku project’ If using a database: heroku addons:create heroku-postgresql:hobby-devheroku pg:psql

Ranking in SQL

Rank results by the values in a column: SELECT *, RANK() OVER (PARTITION BY column1 ORDER BY column2 DESC) AS rnkFROM table Restrict the number of results to return only the top or bottom X results SELECT *, RANK() OVER… Continue Reading →

House Purchase Calculator – WA

The below spreadsheet can be used to check key metrics before purchasing a property. All cells in orange are to be filled in with your own values. Everything else is calculated.

Remote connection to Raspberry Pi

Easy SSH when your computer and your PI are on the same network (wifi) Mac/Linux: Open the terminal Windows: Install Putty Ensure the pi is turned on and connected to network Find the ip address of the pi SSH into… Continue Reading →

PostgreSQL Beginner’s Cheat Sheet

Terminal commands: Launch PostgreSQL terminal – psql Copy table from one db to another – pg_dump -t table_name copyfrom_db_name | psql copyto_db_name   PSQL commands: List databases – \d List tables in current database – \dt List table structure – \d table_name List… Continue Reading →

Web Apps

Twitter sentiments – Looks up the 50 most recent tweets from any twitter user, classifies the sentiment of those tweets and outputs the result as a pie chart KS50 Finance – A simulated stock market portfolio tool, useful for learning the… Continue Reading →

© 2020 Keith Yap — Powered by WordPress

Theme by Anders NorenUp ↑