Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Thursday, April 14, 2016

Note to self: How to mount virtualbox shared folders RW, and enable symlinks


So these are two commands to mount shared folder in a linux host on a linux guest so that the guest has full permission in the shared folders.

This first command should be executed on the guest VM

sudo mount -t vboxsf SHARE_NAME /MOUNT_POINT/ -o rw,users,umask=0000

This next command enables symlink creation and should be executed on the host.

VBoxManage setextradata VM_NAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_NAME 1 


Thursday, December 10, 2015

Note To Self: Display Raspberry Pi CPU Temperature


I have recently been messing around with a raspberry pi at work (a Pi2 model B) for driving display screens for our In-Venue product of which I am the product owner. And very exciting it is too, because the real world is the new frontier (this pdf is also a good primer). If you see what I mean, but more on that another time.

So.. I had to overclock the Pi to improve browser performance to even get near to acceptable speed and smoothness of animations. Pro Tip, the Pi is not a graphics device! Having done this and got acceptable results for a clunky prototype to demo with, and load averages that stayed on the sane side of normal I thought I'd better see if I was frying the CPU. And because I will inevitably forget this useful command I'm saving it here for posterity. Here's how I got the temperature reading..

/opt/vc/bin/vcgencmd measure_temp
Enjoy!


Thursday, May 30, 2013

note to self, how to fix "requires installation of untrusted packages" in Ubuntu


I tried to install a couple of updates on my work laptop, running Ubuntu 12.04, a minute or two ago when prompted by the update manager, and I got the "requires installation of untrusted packages" error. I've since dicovered that there are two ways round this, one is to allow untrusted packages by doing the update as root or via sudo, and saying "y" when asked

Install these packages without verification [y/N]?
But I don't like that, you don't know who might be spoofing you with what fake packages. The better way is to rebuild the apt cache. I found the instructions here, I'm claiming no credit for solving the problem, just reproducing them below so that I can be sure to find them again next time I need them. Hopefully some of you who read this in the future will also benefit.

sudo apt-get clean
cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get clean 
sudo apt-get update

Enjoy!


Wednesday, October 19, 2011

Note to self, how to get a list of recipients from the maillog


I spent a while figuring out how to get a list of email recipient addresses from the maillog, without duplicates, for a specific day on RHEL. In the end I distilled it into to one line.

I'm sure I will have to do it again, so I'm making a note of it here, meantime if you need to extract recipient addresses from maillog you're welcome to try it. just paste it onto the command line and hit the go button, its surpisingly quick.

cat /var/log/maillog | grep "Oct 19" |\
grep to= |cut -f5 -d":" | cut -f2 -d"=" | cut -f1 -d"," | \
sed 's/<//' | sed 's/>//' | \
sort | uniq > addresses.txt


I know nothing, I'm not a fortune teller, and you'd be insane to think that I am. This disclaimer was cribbed from an email footer I once received. It is so ridiculous I had to have it for myself.

Statements in this blog that are not purely historical are forward-looking statements including, without limitation, statements regarding my expectations, objectives, anticipations, plans, hopes, beliefs, intentions or strategies regarding the future. Factors that could cause actual results to differ materially from the forward looking statements include risks and uncertainties such as any unforeseen event or any unforeseen system failures, and other risks. It is important to note that actual outcomes could differ materially from those in such forward-looking statements.

Danny Angus Copyright © 2006-2013 (OMG that's seven years of this nonsense)