All This Programming, Machine Learning & Physics

Setting Up a New MacBook Pro

|

Basic speed up

  1. Enable Trackpad “Tap to click” feature
  2. Enable Trackpad “Three finger drag” feature
  3. Setup the Dock on the left and hide it on default and remove auto-hide delay
    defaults write com.apple.dock autohide-delay -float 0
    defaults write com.apple.dock autohide-time-modifier -float 0
    defaults write com.apple.dock expose-animation-duration -float 0.15
    killall Dock
    
  4. Increase cursor speed in the terminal
  5. Setup spaces and keyboard shortcuts

Install useful apps

  1. Homebrew
  2. OhMyZSH

everything (when available) view brew else AppStore else Web.

  1. RayCast
  2. Alfred
  3. KeyboardMaestro
  4. Forklift
  5. Moom
  6. iStatMenus
  7. Shottr
  8. KeePass

Best Alfred Plugins for Programming and Research

|

Alfred is among the first things that I install when setting up a new Mac. It is a keyboard launcher similar to Spotlight but supercharged. A few years back, there used to be an app called Flashlight that brought amazing functionality to Spotlight. Sadly, Flashlight is no longer an option because it needs macOS “System Integrity Protection” to be disabled which is not safe.

Alfred has a lots of plugins. In the below MindMap I have organized the top plugins that I use for programming and research. You can click on each node to learn more.

Copying Citation from Zotero in BibTex Format

|

Zotero is my favorite application for organizing, sharing, and generating bibliographies for research papers. There are many other similar reference managers such as Mendeley and EndNote with superior features. They are either not open source or free (as in beer) or both. .

Zotoro gets the job done for me. It has got a lot of useful features. One such function is that a citation can be exported to clipboard so that it can be pasted into a document. This can be achieved using ⌘ + ⇧ + c keyboard shortcut.

You can export the citation in a variety of formats. However, if you are using LaTeX to write a paper, you almost always need to paste a quote in a BibTex format into a bib file. There are a few ways of achieving this as mentioned in the forum thread. I found that the easiest way is to download and install the BibTex generic citation style from the Zotero style repository. After installing, set the default export format to BibTex generic citation style as shown below.

Tiddlywiki Mindmap

|

Embed Pure HTML Inside a Jekyll Blog

|

There are many instances where we would like to include an entire HTML page inside a Jekyll blog. This is usually done using the Jekyll’s include directive. However for it to work, the included page has to be inside the _includes directory. There is also a include_relative directive, whose documentation is confusing at best. Also these include* mechanisms fail if a sufficiently complex HTML page (such as Tiddlywiki ) were to be included. The following solution which just uses a simple iFrame seems work work rather well:

  1. Create a directory in the root of the blog with some name, say files
  2. Drop the file to be included in that directory, say example.html.
  3. Add a code snippet similar to the below in a post.
<div id="included">
  <iframe height="500" width="800" scrolling="yes"
    src="/files/example.html"
    frameborder="no" allowtransparency="true" allowfullscreen="true">
  </iframe>
</div>

The output should look like the below.