jerous' ::1

Listing of these articles
2016-09-20 [E] [D]
bash,linux,osx,bsd Comments 0

ssh-copy-id is a very useful tool to quickly gain passwordless access to a server. However, it does not always work right away.

I've encountered this problem enough times to have written a script that will check for possible problems.

It requires 1 argument, the host to connect to, and will request for a password on the command line. Then it will check all of the following, which are known to cause some problems:

  • are there public key files?
  • sshd_config at the host
  • permission of .ssh/authorized_keys, ~/.ssh and ~

The source code can be view below, and downloaded on this link.

The requirements:

  • expect
  • ssh (obviously)
  • perl (to obtain permissions in a OS-agnostic way)

If you know other causes of problems, please inform me so I can add them :)

read more...

For simulations I need to call functions in MATLAB and retrieve results from within a omnet++ simulation. There is documentation, however, it took me a while before I got it all working. So, I ended up with a small wrapper class that allows one to evaluate MATLAB code in a running MATLAB instance.

Because MATLAB has to start up the GUI every time the simulation starts (edit: I discovered it has a flag -nojvm -nodisplay -nodesktop which speeds this up), it gets quite slow and annoying, and thus I also looked at writing a wrapper for octave, a language that is largely compatible with MATLAB. Another advantage of using octave, instead of MATLAB is that octave is a shared library that runs in the same process, so one can pass around pointers.

By flipping a switch, the code will be either MATLAB or octave based.

The source and very simple, small examples can be found in source.tgz (5 KiB, modified on 27 January 2016, MD5 0b00489725ee2afbd929429f004c2355)

Click the read more link for some more info. read more...

2014-04-24 [E] [D]
osx Comments 0

OSX has a pretty nice dictionary, but is a lacking in available dictionaries.

http://clasquin-johnson.co.za/michel/mac-os-x-dictionaries/index.html provides a lot of translation dictionaries.

I also recently discovered that three-finger tapping on a word will open the entry for that word :)

2013-11-19 [E] [D]
osx Comments 0

Just some corrections to [http://dingus9.blogspot.be/2013/07/multiple-homebrew-sources.html], and for further reference to myself.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
cd /usr/local/Library
git remote add kde https://github.com/somekool/homebrew.git
git fetch kde
git checkout kde_on_brew/master

# gives an error
brew search okular
# however, this works
brew install okular

# After you've installed your stuff
git checkout master

Thanks, Nick Shobe :)

2012-07-31 [E] [D]
osx,bash,linux Comments 0

An interesting set of dot-files https://github.com/mathiasbynens/dotfiles.

2012-06-04 [E] [D]
osx Comments 0

Edit: I moved this to its own page

OSX is not my favourite OS, but at work I "have" to use it.

To make it more usable, I have installed some tools, which I'll list here. It will get updates as I find new tools.

read more...

2012-05-22 [E] [D]
bash,linux,osx Comments 0

Resolving a path in bash in a cross platform way:

1
2
3
4
function resolve_path {
    cd "$(dirname "$1")"
    pwd
}

or oneliner

1
path="$(cd "$(dirname "$path")"; pwd)";

To get the full path of the current script, one can use

1
path="$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd  )"
which works regardless of $0's value.

2012-03-28 [E] [D]
osx Comments 0
Listing of these articles Download these articles
[printer friendly] [static version] [Post listing] [Page listing] [Tags: music tab jazz travel wdb europe code live programming youtube record ]