Entries tagged package

Use ssh-agent for atom.io remote-sync under MacOS

Posted on 22. Januar 2017 Comments

If you use the IDE atom.io with some sort of remote sync/scp/sftp package you can’t just use ssh-keys out of the box, if you set them up with a passphrase (which you should!). Here’s the 3 options most plugins offer:

  1. Use password (unless you disabled the option on the server)
  2. Use ssh-key
  3. Use ssh-agent

The problem with #2 is, that you would have to save your passphrase in a clear-text file which is never a good idea. But you can use the ssh-agent on MacOS the following way:

  1. create a ~/.ssh/config file
  2. add this line: AddKeysToAgent yes
  3. $ ssh-add .ssh/id_rsa
  4. restart atom

Flattr this!

Using a Perl script because refactoring of a project with Android tools didn’t work

Posted on 20. Dezember 2014 Comments

I wanted to rename my project but I guess since it has a lot of dependencies that caused an error somewhere and I got the error message:

A fatal error occurred while performing the refactoring.
An unexpected exception occurred while creating a change object. See the error log for more details.

So I just the normal refactoring feature of Eclipse which not surprisingly also caused an error. After editing the AndroidManifest package entry, the import of the resources in the sources files didn’t work. It still said

import com.example.oldpackage.R

Only a couple of resource files needed manual editing but the Java files were a problem. What did the trick for me was this one-liner

perl -pi -w -e 's/import com.example.oldpackage.R/import com.example.newpackage.R/g;' `grep -r -l "import com.example.oldpackage.R"`

I realise this is rather quick&dirty (do a backup 😉 ) but it did work for this project. A short explanation:


  • -pi puts the code in a loop (like -n, but sed-style)
  • -w gives you warnings
  • -e is one line of programm and since -pi
  • /g global, for all lines in the file


  • -r recursive
  • -l give out files that matches the following search string

Flattr this!

How to disable ACK with xbee-arduino API

Posted on 23. April 2014 Comments

It might be useful to disable all the ACK packages(0x8B) for testing purposes. That’s possible with all packages that inherit from XBeeRequest, my example shows a ZBTxRequest.


Flattr this!