Ramdisk for the impatient.

I have a pci-e based storage working at close to 1000mb/s (Mac Pro). I do lots of GCC/make compilations. What if you want things even faster than with a pcie? Then ramdisk is your friend.

My results:

  • With Regular SSD:  2 minutes and 37 seconds   (on my co-worker’s machine w/Fedora)
  • With my pci-e disk: 2 minutes and 35 seconds (my Mac w/Fedora)
  • With Ramdisk:           1 minute and 15 seconds (my Mac w/Fedora)

So we have ~50% improvement in compilation time. For me, it’s worth the effort.

To set one up: Follow this guide


[code language='bash']
sudo mkdir /mnt/ramdisk
sudo mount -t tmpfs -o size=2G tmpfs /mnt/ramdisk

To see how much of it is still available:

df -h

You might want to write an rsync script to copy folders onto the ramdisk that you want fast-access to. Ex a git repo that you compile frequently, some application binaries that you run. But obviously avoid putting data onto the disk.




pipe commands into clipboard

I often need to pipe commands into the clipboard. E.g when I type “pwd” to get the present working directory, I would normally select the line and then copy it into my clipboard.

After a while this became tedious so I wrote a script to make life easier. I created a bash script called “toclip”…

Continue reading

Create an area screenshot, host it on github and copy web url to clipboard with one command

I often find myself having to create a screenshot and upload it somewhere so that I can paste it on irc/(mail without adding weight to email)/bugzilla etc.

Eventually I solved the problem by writing  a script that:

  1. Creates a screenshot of an area (gnome-screenshot)
  2. Saves it to your picture folder
  3. adds/commits/pushes to your git hub
  4. copies path to your clipboard
  5. opens chrome to verify that screenshot uploaded successfully.


Continue reading