Foursquare – an awesome location services that I use way more than I should – announces the release of Version 3. They have a lengthy blog post explaining their reasons, goals, and changes. And I have to say that it’s exciting. I was slightly worried that they might give up given the Google Latitude check-ins competition, but apparently they are not. Good for them! Anyways, my phone still runs Android 2.1, so the newer Latitude is not available to me. But the new Foursquare is. And there is plenty of new fun, including leaderboards and Explore.
Month: March 2011
chmod text modes
I came across this blog post which praises text modes for /bin/chmod.
There are two ways you can change file permissions in Unix – one is using
chmod
‘s symbolic (text) modes (likechmod ug+x file
), the other is using the octal modes (likechmod 0660 file
). It turns out that symbolic modes are more powerful because you can mask out the permission bits you want to change! Octal permission modes are absolute and can’t be used to change individual bits. Octal modes are also sometimes called absolute because of that.
I have to agree, they are superior. However I feel like the article needs more examples. So here we go.
Use “u” for user, “g” for group, “o” for others, and “a” for all, or you can use a combination of letters, similar to how you do for access rights:
$ chmod ug+rw *.php
This will make all .php files in current directory readable and writable by both user and group.
Use several permission changes within one command. Just separate them by comma.
$ chmod a-rwx,ug+rw,o+r *.php
The above will reset permissions on all .php files to readable by all and writable only by user and group.
And my favorite and most used example, which would be tricky with octal permissions is the “X”. In recursive change mode, “X” will affect executable bit only on directories. Difference by illustration:
$ chmod -R a+x /some/path
The above will add executable bit to all files and folders under /some/path.
$ chmod -R a+X /some/path
But the above will add executable bit only to folders under /some/path. The files will remain as they are.
Movie bar codes
Here is an interesting bar code idea for – compress a movie into a collection of colorful lines. Some films are easily recognizable this way, some are not. But wouldn’t it be nice if one could decompress a movie from the bar code? It would. Too bad it borders with technically impossible. Some day, maybe.
Day in brief
- Shared: Tweet your Hotpot ratings in Google Maps for Android http://bit.ly/gp3ju0 #
- Shared: Decide what the world sees when it searches for you http://bit.ly/gL1BtB #
- Shared: 100 years of celebrating women http://bit.ly/fjAI40 #
- Fedora is beautiful. Even through a maximized VMware window running on some Windows. Gotta love corporate standards. #
Dear women, I love you. Not only today.
Today is the International Women’s Day. While it is getting more recognition worldwide in recent years, being Russian, I am used to having it as a public holiday since the USSR days. This is the day to once again tell women how beautiful, smart, and appreciated they are.
Dear ladies, have a nice day! Thank you for your smiles, for your charm, for your beauty, and for your inspiration. The world wouldn’t be worth living in without you.