2016-11-27

R - Load a text file into a variable

variable_name <- b="">scan
("path/to-file.txt", what="character", sep="\n")

2016-11-01

MacOS - PRAM Reset

  1. Turn the mac off.
  2. Unplug it for ~20 seconds.
  3. Plug it back (wall power supply).
  4. Press 4 keys simultaneously, for 10 seconds, then release
    1. left ALT OPTION
    2. left COMMAND
    3. the letter P
    4. the letter R



This works at least on a mac book pro.

MacOS - How to reset the SMC (System Management Controller)


  1. Turn the mac off.
  2. Unplug it for ~20 seconds.
  3. Plug it back (wall power supply).
  4. Press 4 keys simultaneously, for 10 seconds, then release
    1. left SHIFT
    2. left CONTROL
    3. left ALT OPTION
    4. POWER (top right)



This works at least on a mac book pro.

VirtualBox - How to extend/enlarge/grow your windows vm vdi hard drive


(1) Run this command line to grow to 100 GB

VBoxManage modifyhd HARD_DRIVE_FILE_NAME.vdi --resize 100000

(2) Open windows "Disk Management" app and right click over the hard drive you are trying to grow, and select "Extend". Follow the menu prompts (default selections work), and voila!