How to change MAC address in Debian 6.0 Linux

First of all we have to stop networking. /etc/network/interfaces file and under eth0 (or other network interface) add following line:

hwaddress ether your_new_mac_address

After that you can start networking again.


sudo /etc/init.d/networking stop  

sudo vi /etc/network/interfaces

#now add:  hwaddress ether 01:02:03:04:05:06 

sudo /etc/init.d/networking start


How to delete all .svn folders/files from a project

Just cd to a folder in Terminal and:

find ./ -name “.svn” | xargs rm -Rf

Tagged ,

How to use multiple owncloud accounts on one computer (on Mac OS X)

Two ownlcoud clients on one computer Using owncloud to store your files in a cloud where you control your data and not some greedy company is becoming more and more popular. Its very convenient and I made two servers one for my job and one my personal, on my personal server. Everything would be OK if not one major drawback of owncloud client application: it doesn’t support more than one servers/accounts. Developers know about it, but don’t plan to change this in the nearest future.

But if you know how to use your Mac and have some unix experience, you can make it work as you want it to! Shortly this method creates another user account on Max OS X and starts the second owncloud client as that user. So here are some steps for a workaround:

1. Create another account in Sysytem Preferences -> Users & Groups. For this tutorial we will call it “owncloudpersonal”.

System Preferences

Users & Groups

2. Create a folder where you want your file to be stored and give “owncloudpersonal” user permission to read and write this folder: right click on a newly created folder -> Get Info -> Sharing & permissions -> plus sign.


Select “owncloudpersonal” user and press Select. Now change its privilege to Read & write.

ownCloudPersonal Info-2

3. Now you have to run another owncloud instance as newly created user. At the moment I’m doing it through Terminal with this command:

sudo -u owncloudpersonal /Applications/

You can close terminal app. Owncloud client will run fine without it.

I’m working on moving it to Automator, to not open Terminal app every time I want to start owncloud. I’ve tried this AppleScript but it doesn’t seem to work:

do shell script “sudo -u owncloudpersonal /Applications/” with administrator privileges

If you have some ideas, please write in comments.

At the moment it seems that saving password is not working, you have to enter it every time you start second owncloud instance. If you have a solution for this problem, feel free to write it in comments too!

PS. I think linux users can do something quite similar to solve this problem.

Tagged , ,

Compress (zip) folder on Linux Debian

I always forget this commands, so here it is:

tar -czvf name.tar.gz folder/

Decompressing (unzipping) is here:

gunzip name.tar.gz

How to add select in Excel (only allow to select value from predefined list)

To create a cell in Microsoft Excel in which you can only enter one of predefined values and/or insert there select element, which lets you select the value with a mouse (without typing in values with keyboard) follow these steps:

1. Crete a list of the values that should be in select. Tip: make additional sheet for these lists if you have more than one. It’s commonly called lookup tables.

2. Select a cell or cells range where you want to insert selects and select from Excel menu Data -> Validation.

3. If newly opened window select Allow: List.

4. Press on Source and select a lookup table that you have created in step 1.

5. Check if In-cell dropdown is selected and press OK.

6. Enjoy :)


Screenshots from MAC version, but on Windows its essentially the same:

RGB color picker in XCode

Have you ever wondered why there is no RGB color selector in XCode? I don’t understand why Apple haven’t put it by default. But thanks to some guy named Wade Cosgrove there is a solution!

All you have to do is:

  • download you new color picker from here
  • close XCode
  • unzip the file
  • copy DeveloperColorPicker.colorPicker fie to ~/Library/ColorPickers/ folder. Open finder, from menu select Go -> Go to folder and enter  ~/Library/ColorPickers/
  • launch XCode and enjoy

How to change MAC address in Debian 6.0 Linux

First of all we have to stop networking. /etc/network/interfaces file and under eth0 (or other network interface) add following line:

hwaddress ether your_new_mac_address

After that you can start networking again.


sudo /etc/init.d/networking stop  

sudo vi /etc/network/interfaces

#now add:  hwaddress ether 01:02:03:04:05:06 

sudo /etc/init.d/networking start

How to use Blackberry App World in unsupported country

If you have BlackBerry Playbook but are now in unsupported country, You can’t download or update any applications. Looks like 20th century, doesn’t it? But You know that we are in 21st century and RIM cannot do anything about it ;)

Here I will describe a way to access AppWorld from unsupported country. The only thing you need is Mac with wifi, connected to the Internet using ethernet cable. If You have a PC with windows 7, you can follow this tutorial.

Generally, AppWorld checks Your IP address is it from the country they allow. So basically, we need to change the IP address we are using to one from supported countries. For example from US. To this, we will use VPN.

Firstly, we have to find VPN server with IP from USA and connect our Mac to it. Secondly we have to share this connection through wifi.

How to connect your Mac to VPN you can read here.

How to share this connection read here.

PS. If you don’t want to buy VPN account, try this one for free.

PPS. If you like this post, write it in comments ;)

How to compile and deploy BlackBerry PlayBook Tablet WebWorks program on MacOs (and maybe linux)

If you want to make programs for BlackBerry PlayBook Tablet using html5 and javascript you have to download and install SDK. It’s quite simple and described in documentation quite well. But when you start compiling and deploying program to simulator things are getting quite complicated and very badly documented (at least at the time when this post is written). Even a program downloaded from Blackeberry tutorial doesn’t want to compile.

First of all, to compile a program, you have to compress all files of your project (usually those ate html, js, css files and images) into a single zip file. First mistake that you will make is adding whole folder to archive . This doesn’t work ;) You should archive only files. Secondly, there shouldn’t be any unnecessary files like eclipse’s .project or Mac-Os’s .DS-Store hidden files. If compiler will find some of them i zipped file – it will fail.

So here is a short tutorial how to get started developing for  BlackBerry PlayBook Tablet using WebWorks (and not Adobe AIR) on MacOs without any software for money.

  1. Create folder where your programs will be stored. For this tutorial let’s call it “progs”
  2. Inside this folder you can create as many folders as you want. One folder per program. For example you can extract SketchBook example program that can be taken from BlackBerry tutorial page and rename that folder to “sb”. Just try using short folder names without spaces and any other unnecessary symbols, because compiler seems to not like such names.
  3. Inside folder "progs" create file named "compile_deploy" and fill it with:
    dir="sb" #directory name
    path="/Users/Username/bbwp/" #path to SDK
    password="pass" #password set on emulator
    ip="" #IP of emulator
    #do not edit from this point
    cd $dir
    find . -name '*.DS_Store' -type f -delete
    zip -r ../$ *
    cd ..
    "$path"bbwp $
    "$path"blackberry-tablet-sdk/bin/blackberry-deploy -installApp -password $password -device $ip -package bin/$

    In the first part of file there are some variables that should be changed: directory in which is the program (“sb”), path to directory where SDK was installed, password set in emulator, IP address of emulator.

  4. Start terminal. go to “progs” directory and run command:
    chmod a+x compile_deploy
  5. Now if you run

    Script that we just created will remove all DS_STORE files, zip all files inside directory, compile progarm and deploy everything into emulator (which by the way should have been started before ;))

  6. Test your program :)

If you have any questions feel free to ask in comments.

Some useful linux commands for a new server

First of all I would recommend to change the port of ssh:

vi /etc/ssh/sshd_config

service sshd reload

Find line Port 22 and change it to some other number greater than 1024.

Then, you would like to login to the server without using password. This procedure is described here. By the way, if by that time you have changed your ssh port, don’t forget to add -p1024 (or other port used) tu ssh commands you use in this tutorial. What is more, it is recommended to set .ssh folder permissions to 700 and .ssh/authorized_keys to 640:

chmod 700 .ssh

chmod 640 .ssh/authorized_keys