wesley tanaka

Tech

Command line replacement for gitk --all and GitX

()

gitk --all, tig and GitX are invaluable for visualizing the git commit graph, but when GitX recently stopped displaying branch names on a repository I work with, I started looking for a stock git install command line replacement for two reasons:

  • It takes slightly longer to copy and paste GUI output over chat.
  • When helping someone with a git issue, it's time consuming to ask them to install GitX or gitk first.

Here is a command line that provides similar commit graph visualization:

Creating a one dimensional plot in R and ggplot2

()

To plot a "scatter plot" of a single dimensional variable in R, you can use:

ggplot(my_dataframe, aes(x=my_dataframe$VariableName, y=c(0))) + geom_point()

Restoring the old Chrome profile menu

()

A recent version of Chrome changed the graphical profile avatar in the upper right corner of the window into a piece of text which is much harder to recognize quickly and requires 3 clicks instead of 2 in order to switch to a new window in a different profile.  To switch back to the old behavior:

  1. Go to: chrome://flags/#enable-new-avatar-menu
  2. Switch it to "Disabled"
  3. Restart Chrome

Ubuntu on a Toshiba Satellite C55-A

()

Here are notes from installing Ubuntu Linux 13.10 and 14.04.1 on a Toshiba C55-A laptop.

Computer hangs during boot (with a black screen and the backlight on)

Booting the Live DVD results in the computer freezing. Using acpi=off and pci=biosirq resulted in the boot getting further along (which you can debug by also removing the splash and quiet options), but ultimately it was necessary to add these kernel command line parameters both when booting from the Live DVD and in /boot/grub/grub.cfg:

Differences between tmux vs screen

()

I evaluated switching from screen to tmux. tmux is a much younger project with some vocal advocates online. After looking into the differences between them, I will likely switch to tmux for a while to become familiar with it, but may end up switching back to screen because

Haskell unicode character and byte string conversions

()

Run "System Settings" in Ubuntu Unity from the command line

()

To run "System Settings" control panel from the command line in Ubuntu, run:

unity-control-center

It is possible to launch the window with a specific group selected, like:

unity-control-center display

Setting an external monitor as default on the Ubuntu login screen

()

In /etc/lightdm/lightdm.conf, add these lines to the SeatDefaults section:

[SeatDefaults]
display-setup-script=xrandr --output VGA1 --mode 1280x720 --primary
session-setup-script=xrandr --output VGA1 --mode 1280x720 --primary

If the external monitor is not detected, this may cause an error:

The system is running in low-graphics mode

Back up a git repository in a single file

()

This page contains a comparison between different approaches and file formats for backing up a git repository in a single file.

Summary: The best method is probably git bundle

R quick reference cheat sheet

()

Here are some notes I took while learning about R:

Workspace

  • ?matrix -- gets help on "matrix"
  • ls() -- lists variables that exist
  • rm() -- deallocates a variable

Run script from command line

Rscript hello.r

Common data types

Syndicate content
by Wesley Tanaka