Search

Erlend's Lookout Post

Concerning ns-3, Xubuntu and other stuff.

“Auto-scale” pyplots

xmin=data['x'].min()
xmax=data['x'].max()
xdiff = (xmax-xmin)*0.05 # 5%

ymin=data['y'].min()
ymax=data['y'].max()
ydiff = (ymax-ymin)*0.05 # 5%

ax.set_xlim(xmin=xmin-xdiff, xmax=xmax+xdiff)

ax.set_ylim(ymin=ymin-ydiff,ymax=ymax+ydiff)

Fix dropbox icon in Xubuntu

From http://askubuntu.com/questions/732816/xubuntu-dropbox-icon-fail

In you terminal run
sudo gedit /usr/bin/dropbox

Create a new line after import os and add the following:
os.environ['DBUS_SESSION_BUS_ADDRESS'] = ""

Save and reboot

Wireless on nx6325 and Xubuntu 16.04

Basically just do this:

sudo apt-get purge bcmwl-kernel-source broadcom-sta-common broadcom-sta-source && sudo apt-get install b43-fwcutter firmware-b43-installer

Remove the ethernet cable.

Restart computer.

 

Source: easylinuxtipsproject

Auto-mount host folder in virtualbox

Do the tip here: http://www.htpcbeginner.com/mount-virtualbox-shared-folder-on-ubuntu-linux/

 

In short:

Install guest-os-additions

Add user to vboxfs user group:
sudo usermod -a -G vboxsf USER

Create easy accessible symbolic link:
sudo ln -s /media/sf_Share /home/<>/Share

Enable auto-mount for the shared folder:
You may go to Device->Shared Folder Settings, edit the shared folder, and enable Auto-mount.

Install Google Earth (not pro) on XUbuntu 14.04

From: www.webupd8.org

sudo apt-get install googleearth-package
make-googleearth-package --force
sudo apt-get install gdebi
sudo gdebi googleearth*.deb

Import olsrd into Eclipse

This is to avoid all sorts of red markers on the right hand side (potential compilation errors). I have not yet tried to compile this. Just browsing at the moment:

  1. Create new makefile project with existing code.
  2. Set project path to be the top directory olsrd.
  3. Make sure to select the Linux toolchain (or the correct one for your environment).

That’s it.

Xming

If problems starting Xming applications, disable some security on the windows machine.

http://www.sevenforums.com/network-sharing/113729-password-protected-network-share.html#post978798

git aliases

Here are some nice-to-have aliases and config setup for git:


git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.fe fetch
git config --global alias.ps push
git config --global alias.pu pull
git config --global alias.unstage 'reset HEAD --'
git config --global credential.helper cache
git config --global credential.helper "cache --timeout=86400"
git config --global core.editor nano
git config --global color.ui true

Remove false errors in Eclipse

From http://stackoverflow.com/questions/10554266/eclipse-c-c-shows-errors-but-compiles

 

Eclipse may or may not be pulling the paths to index from your build setup, depending on the configuration. Most likely, it is not…it’s building correctly because your build setup is just fine, and you can probably build by hand.

The CDT indexer (which is the engine for deciding where all those pretty underlines, as well as code completion, F3 declaration jumping, etc comes from) isn’t smart enough in a lot of cases to parse out your Makefiles and know where to look for headers and source. You need to tell Eclipse that information manually.

Go to Project Properties -> C/C++ General -> Paths and Symbols.

The amount of work you need to put into this can vary greatly, depending on your environment. For me, it was only necessary to add scratch and src as library paths. If this external library is the only thing giving you headaches, then you probably just need to add the paths for that library and reindex:

Right-click on the project and select Index -> Rebuild

Blog at WordPress.com.

Up ↑

Follow

Get every new post delivered to your Inbox.