Archive for July, 2009

Recursively chmod directories only

July 25, 2009


find . -type d -exec chmod 755 {} \;

This will recursively search your directory tree (starting at dir ‘dot’) and chmod 755 all directories only.

Similarly, the following will chmod all files only (and ignore the directories):

find . -type f -exec chmod 644 {} \;

apt-get through proxy

July 21, 2009

$ export http_proxy=http://myuname:mypass@myproxy:myport

$ sudo apt-get update

Understanding Linux file permissions

July 17, 2009

Here. By Mayank Sarup.

What do “read”/”write”/”execute” mean?

r – Read permission. Whether the file may be read. In the case of a
directory, this would mean the ability to list the contents of the

w – Write permission. Whether the file may be written to or modified. For
a directory, this defines whether you can make any changes to the contents
of the directory. If write permission is not set then you will not be able
to delete, rename or create a file.

x – Execute permission. Whether the file may be executed. In the case of a
directory, this attribute decides whether you have permission to enter,
run a search through that directory or execute some program from that

Examples of and related commands

chmod u-x,g+w,o+rw somefile

chmod xyz filename

(r = 4; w = 2; x = 1)

chown new-owner somefile

chgrp new-grp somefile

Accessing UI views, properties and methods in main app in Flex

July 6, 2009

This applies to both AIR and Flex project, in Flex SDK 3.3:

// Application.application refers to the top level application.
// But be aware that it's typed to Object as opposed to Application.
// According to Flex team, it's for the purpose of fast compilation and
// being able to access properties/methods in the <Script> of their
// <Application> without having to cast it to their application's real type.
// So this means you can get:
// var stuff:SomeStuff = Application.application.getStuff();
// but you would have to access the real application each time by saying
// Application.application. Or you can do it this way:

var app:MySubclassedApplication = mx.core.Application.application as

// UI components with id names are automatically declared as public
var contactList: ContactList = app.contactList;

// as long as you've declared them as public in your <Script>.:)
var dou:Dug = app.dug;
var stuff:SomeStuff = app.getStuff();

Documentation. Note when you are using SWFLoader to load a module into the main application, you can reference your main application as parentApplication.


Get every new post delivered to your Inbox.