Ravi S. Rāmphal

svādhyāya // contributing to the understanding of myself

Rotate Video 180 Degrees

1
ffmpeg -i input.mp4 -vf "transpose=2,transpose=2" -codec:a copy output.mp4

Things I Am Learning at Work

2014.07.28

  • MongoDB
  • SproutCore
  • building an API
  • Node.js
  • exposing routes to provide information
  • reading legacy code
  • fixing bugs on legacy code
  • dealing with spaghetti code
  • micromanagement
  • I like flat structure

2014.09.03

  • KineticJS
  • Upgrading from KineticJS 4.5.4 to KineticJS 5.1.0
  • refactoring legacy code
  • implicit expression of myself

Say Sorry

Say sorry when you’ve fucked up. Just own up to it. Ignoring it or defending your actions just makes things works and fosters resentment.

Some Git Tricks

Here are a couple of git commands I have mastered on the job since starting:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  git add -p                         # stage partially (in patches)
  git add -p <filename>              # stage partially (in patches) for a given file
  git reset -p                       # unstage partially (in patches)
  git reset -p <filename>            # unstage partially (in patches) for a given file

  git commit --amend                 # add changes to previous (*unpushed*) commit and update commit message

  git diff                           # see changes so far
  git diff --staged                  # see staged changes

  git show <commit>                  # show the changes for a given commit

  git revert <commit>                # revert a given commit

  git stash                          # stash current changes
  git stash list                     # show list of stashed changes
  git stash show -p stash@{<number>} # show specific changes for a given stash
  git apply                          # apply the most recent stash
  git apply stash@{<number>}         # apply a given stash
  git stash clear                    # clear all stashed changes

  git reset --soft HEAD~1            # undo the last commit, but still keep the changes
  git reset --soft <commit>          # undo a given commit, but still keep the changes
  git reset --hard <commit>          # reset the state of all files to that of a given commit (discarding changes)

Ego and Code

Don’t get attached to code. The next release of the codebase might strip all of your code. Just let it go. The experience and the learning is not just the code accumulated on GitHub, it is the process and the choices and decisions.

This is just like Buddhist mandalas. Monks painstakingly take enormous amounts of time to build the beautiful, intricate mandalas, and then they just brush it away. It is the skill and the patience and the focus that matters, not the end result.

Just Do It

Just jump in and do it.