Category Archives: Short Posts

Restarting Cinnamon after freeze without losing session information

Whoo! For some reason, cinnamon freezes extremely often (multiple times a day) on my desktop, and I had been resorting to “ctrl-alt-f1” to get to a terminal and running “killall cinnamon-session”, which brings me back to login screen. Fortunately, there is a better solution, aka “ctrl-alt-esc”.

Here’s the relevant excerpt from the Cinnamon blog (http://segfault.linuxmint.com/2015/06/cinnamon-2-6/):

Desktop freezes

In case of a freeze or if you need to restart Cinnamon for any reason, you can now do so via a keyboard shortcut. The default key combination is Ctrl+Alt+Escape. Pressing this combination of keys restarts nemo and cinnamon-settings-daemon in case they had crashed, and launches a brand new instance of the Cinnamon desktop. Unlike Ctrl+Alt+Backspace which terminates your session and brings you back to the login screen, Ctrl+Alt+Escape simply restarts Cinnamon itself, which means your session is exactly as it was, you don’t lose any work and all your windows and applications remain open.

 

hack4fem: hack for feminism (conference & hackathon) logo

hack4femlogo hack4femlogoI made a logo for a new project I am starting up. It’s a mashup of a bunch of openclipart files, It combines the feminist logo (fist inside Venus sign) with STEM (wrench for mechanical engineering / hands-on, lightning for electrical engineering, then on the nails, a graph for mathematics, beaker for science, and “</>” for coding). The logo expresses my desire to combine my STEM skills with my feminist / activist passions. I refuse to choose between activism and advancing my technical prowess.

hack4femlogoHere is the SVG sourcehack4femlogo, which I release back into the public domain.

If you’re interested in helping organize the first hack4fem conference, email me! 🙂 It’s set for Nov. 7th & 8th (Sat. and Sun.), 2015, in Boston, MA.

A gif of my brain (MRI scans)

http://www.gfycat.com/BetterPhysicalIvorybilledwoodpecker

(License: Public Domain, https://creativecommons.org/publicdomain/zero/1.0/)

I participated in a research study last night and got a CD with 40 MB of scans of my brain. Yay!

I didn’t have a fancy DICOM viewer like OSIRIx, which lets you fly through the brain in any direction you want by reconstructing the data appropriately from the MRI slices, but I was able to make the above gif using just two lines on the command-line in linux.

How I made the gif

Then, upload to gfycat.

Other viewers

Mango

A DICOM viewer (kind of clunky / not well integrated into Ubuntu):

DICOM Web Viewer

A browser-based DICOM viewer that is somehow better integrated into linux:

https://github.com/ivmartel/dwv

To use, download and unzip, go to the folder for the viewer you want, and open up “index.html”. For instance:

file:///home/nrw/Pictures/ivmartel-dwv-2b340ec/viewers/static/index.html

Then click “file” and select all the files you want to open.

Scaling Gfycats (in embedded iframes)

The gfycat was pretty small, so I wanted to embed a scaled-up version here. Doing so took me a few minutes to figure out, so here it is. After getting the iframe code from gfycat.com, I manually set the width and height to be 2x, then set scale to be 2  and added scaling for firefox.

However, my image was now scaling off the page! From stackoverflow I figured out that I need to add “transform-origin” attributes in there. See below.

 <iframe width="512" height="512" style="-webkit-backface-visibility: hidden; -webkit-transform: scale(2); -webkit-transform-origin: 0 0; -moz-transform-scale(2); -moz-transform-origin: 0 0;" src="http://gfycat.com/ifr/BetterPhysicalIvorybilledwoodpecker" frameborder="0" scrolling="no"></iframe>

Update: 29 July 2015

I found a better viewer than mango and dwv. Slicer lets you see the brain scans from any angle (the defaut is top – side – back), and you can import ALL the DICOM files and it will sort out for you which ones belong to a “series” (hard to do in the native file manager since my file manager doesn’t show DICOM previews). See pictures below.

To get slicer, go to http://download.slicer.org/ and download the .tar.gz, then extract its contents. Go into the extracted root folder (something like “Slicer-4.4.0-linux-amd64”) and run the executable in the root folder.

Screenshot from 2015-07-28 19:46:04

Screenshot from 2015-07-29 04:43:05