Life and computer hacks

jQuery notes

How to select things and modify them:

$("#css_selector").prop("some_html_attribute", "value")


  1. Setting HTML properties
isAuthenticated = ...;
$("btn-logout").prop("disabled", !isAuthenticated);
  1. Setting CSS properties
if (isAuthenticated) {
    $("#content").css('visibility', 'visible')

else {
    $("#content").css('visibility', 'hidden')

Learn CSS with Julia Evans' CSS zine

I purchased it! It's accessible here.

How to find out power outage history in Massachusetts

This link provides a starting point:


The historic power outage information can be found in the initial filings (generally the filing with the oldest date) and includes information such as:
- city or town where the outage occurred
- number of customers affected
- outage duration
- time the outage occurred
- reason for outage

We are apparently supposed to go to the Massachusetts government online file room, which will give us access to a spreadsheet.

Eversource and National Grid are the two major providers of power in Massachusetts. We use National Grid south of Boston (Quincy, Hingham, etc.).

How to pull corn off the cob

This is a video in Chinese, found on YouTube.

The key ideas:

  1. Split the corn in half by hand transverse.
  2. Then take a scissor, stick it down the core, and try to split the corn in half laterally.
  3. Finally, pluck off the corn from the cob easily.

See also: The difference between transverse and lateral

How to set powerline fonts with tmux in hyper on zsh

This is admittedly a very, very niche setup.

Some things I did, not sure which are necessary:

  1. Install tmux: brew install tmux.
  2. Install tpm (tmux plugin manager) from GitHub. (Followed instructions there.)
  3. Install Powerline fonts GitHub. Followed instructions, basically executing ./ at the terminal.
  4. Install the powerline-status package into my Anaconda base directory. pip install powerline-status.
  5. Set Hyper's font family (Cmd-,) in a text editor:
    // font family with optional fallbacks
    fontFamily: '"Terminess Powerline", "Anonymice Powerline", "Roboto Mono for Powerline", "Meslo LG S for Powerline", "DejaVu Sans Mono", "Lucida Console", monospace',

As well as the plugins:

    plugins: [
  1. Create new Hyper window. (The settings are applied directly).

I think that is it.


This is the landing page for my notes.

This is 100% inspired by Andy Matuschak's famous notes page. I'm not technically skilled enough to replicate the full "Andy Mode", though, so I just did some simple hacks. If you're curious how these notes compiled, check out the summary in How these notes are made into HTML pages.

This is my "notes garden". I tend to it on a daily basis, and it contains some of my less fully-formed thoughts. Nothing here is intended to be cited, as the link structure evolves over time. The notes are best viewed on a desktop/laptop computer, because of the use of hovers for previews.

There's no formal "navigation", or "search" for these pages. To go somewhere, click on any of the "high-level" notes below, and enjoy.

  1. Notes on statistics
  2. Notes on differential computing
  3. The State of Data Science
  4. Network science
  5. Scholarly readings
  6. Software skills for data scientists
  7. The Data Science Programming Newsletter MOC
  8. Life and computer hacks
  9. Reading Bazaar
  10. Blog drafts
  11. Conference Proposals

Script to download white noise mp3 from YouTube

I have a script to make it an MP3, which assumes you have both youtube-dl and ffmpeg.

youtube-dl --output whitenoise.mp4
ffmpeg -i whitenoise.mp4 -q:a 0 -map a whitenoise.mp3

Now, you can use the MP3 file anywhere. It's 10 hours long, and should do the trick.

(Nothing particularly creative about this one, but I just thought it'd be a great computer hack.)

See also:

Stay healthy with simple exercises

Some experiments I'm trying out:

  1. Daily push-ups.
  2. Walking for at least 30 minutes.
  3. Two meals, not three.

Fix a 3D printer that is not feeding fialment

I used this video to guide me in dismantling the printhead of our 3D printer, and I think I have it fixed.

Leaving this note here for future reference.

Installing magic mirror on a raspberry pi

Documenting some instructions for myself.

Docker-based installation

I used a Docker-based installation to test-drive the server. It was a seamless installation.

  1. Install Docker on a raspberry pi
  2. Install raspberry pi magic mirror via Docker

Manual installation