Atom editor window appearing outside of screen boundaries

If one disconnects an external monitor / projector the Atom editor window has a tendency to show up outside of the screen boundaries – just as if the external monitor was still attached. It took a while to figure out how to get it back again:

  1. Select the Atom window (using Alt-Tab or mouse)
  2. Open the context menu with Alt-Space
  3. Select move using “m”
  4. Press any of the arrow keys
  5. The Atom window will now be possible to drag back to the main monitor using the mouse

This was mentioned in a GitHub thread here: https://github.com/atom/atom/issues/6939

 

sudo without password

Add the following line at the end of /etc/sudoers (just after “#includedir /etc/sudoers.d”):

username ALL=(ALL) NOPASSWD: ALL

In my case:

#includedir /etc/sudoers.d
jonas ALL=(ALL) NOPASSWD: ALL

Check swap on Ubuntu

jonas@yggdrasil:~$ sudo swapon --show
NAME      TYPE       SIZE USED PRIO
/dev/dm-2 partition 11.9G   0B   -1
jonas@yggdrasil:~$

jonas@yggdrasil:~$ sudo free -m
              total        used        free      shared  buff/cache   available
Mem:          11925        9240         911         305        1773        2110
Swap:         12195           0       12195
jonas@yggdrasil:~$ 

Wipe USB drive in Linux by overwriting with random data

Handy way to wipe a USB drive in Linux using dd and /dev/urandom:

jonas@yggdrasil:~$ sudo dd if=/dev/urandom of=/dev/sdc bs=4k
dd: error writing '/dev/sdc': No space left on device
15163393+0 records in
15163392+0 records out
62109253632 bytes (62 GB, 58 GiB) copied, 2227.1 s, 27.9 MB/s

Of course, make sure /dev/sdX is the USB device you want to wipe. DD isn’t being referred to as the “Disk Destroyer” for nothing 🙂