avatar

Analytics | Cloud | Data | Start ups

Remove File From Last Commit

It is very common to make a git commit and then realizing that some files must be removed from the commit. It’s easy to do so. git rm --cached <file_name> git commit --amend -m "Commit message" Remote repository 🔗This change rewrites the git history, and will create problem on shared branches if other people has already pulled the changes. For this reason, if the changes were pushed to remote, you should make a git pull --rebase before making git push.

Javascript Hoisting

Hoisting is a behavior in Javascript where the declaration of a variable, function or a class goes to the top of the scope where it was declared. For example, the following code works without an error: helloWorld() // Hello, world! function helloWorld(){ console.log("Hello, world!") } Here, helloWorld() function is executed before it was declared. Before the interpreter starts executing, it hoists (brings up, lifts) the declaration code to the top.

Google Cloud Storage Logs

Google Cloud Storage is the equivalent of AWS S3 on GCP. This is the Google Cloud’s blob object storage service. Inside each bucket, the Observability tab shows key metrics about the bucket, such as request rates, network error and client errors. However, detailed logs are not enabled by default and must be manually activated. The two types of GCS logs 🔗GCS offers two types of logs. You must enable the correct log type depending on the use case.

Transactions in Google BigQuery

Transactions enable running multiple queries, on multiple tables, such that either all of them succeeds or none runs. This allows performing mutating operations on the target tables, such as inserting or deleting rows, and either commit to all changes or roll back atomically. Transactions guarantee ACID properties. During a transaction, all reads return a consistent snapshot of the tables. If a statement in a multi-statement transaction modifies a table, the changes are visible subsequent statements within the same transaction.

Git Remove .DS_Store

Every developer using a Mac has found a .DS_Store file on their git. Nothing to be alarmed, this is a harmless file. However, it can be annoying when it shows up on every folder. What is .DS_Store? 🔗.DS_Store is a hidden metadata file for MacOS. The file contains information specific to the folder it’s in: folder color, icon size, window size, file order, etc. The file is created the first time any View Options is selected for a folder, but it’s hidden using the .

Git Fork: A Short Note

A fork is a new repository that shares codes and visibility settings with an “upstream” repository. Forks are used to iterate on ideas, or maintain changes to a repository when a user does not have write access to upstream, or simply prefers to keep a personal copy. How to fork a repository 🔗A repository can be forked from the GitHub.com page of the repository. How to update the forked repository 🔗Add the remote, call it “upstream”.

OKRs: The Why, What, and How

Objectives & key results, or OKRs, are a simple goal-setting system and they work for organizations, they work for teams, they even work for individuals. The objectives are what you want to have accomplished. The key results are how I’m going to get that done. The why behind the goal 🔗The teams must develop a shared sense of purpose that defines why they do what they do. Without the “why”, the what and how of OKR might seem to be a meaningless exercise.

Linear Algebra Foundations

Linear algebra is a powerful tool for data manipulation. It is easier to conceptualize using geometry. This article uses a two dimensional plane because they are easier to visualize. A 2-D plane means a data set with only two entries. But same ideas extend to n-dimensional plane or data sets with n entries. Linear algebra concepts 🔗Linear algebra involves writing numbers in columns () called vectors, and boxes () called matrices.