Ramin Hossaini (blog)

3Sep/100

Updated: Flickr comment generator

I had a shocking revelation today: people are actually using my Flickr-comment-generator. Even cooler: I realised people were using the Greasemonkey script I had created to go along with it. Shame on all of you!

After Flickr redesigned their photo-pages, the script stopped working though, and people had to actually think of comments to write (terrible!). I finally took the time out today to update the script and now everybody can have generic-goodness available to them.

Also, if you would like to contribute to this terrible project by submitting generic comments of your own, feel free to send me an email here

12Aug/100

Flickr’s reply-implementation

Apart from a few annoyances, I'm generally pretty happy with the new Flickr design on photo-pages. All the extra AJAX makes things a lot easier (at least for me personally) and I quite like the larger images.

I've been using Flickr since 2005 and I'm not sure how new this feature is, but I think it was implemented with the new photo-pages.

Hover over a comment, and you'll see a 'reply' link becomes available:

All it does is add a piece of code to the comment-box (a link to the user's photo-stream enclosed in square brackets (you can also click multiple reply-links):

And then what? You see, I used to put an @ in front of the user's name. You know - Twitter style. But I've seen how user's change their name and the reply looks awkward. This instead is what you get in the end (the user's icon is displayed before your reply):

I remember how there was a Greasemonkey implementation for this, and it's great to see it implemented. Use it!

Tagged as: , No Comments
28Jun/100

Linux: Tar and Zip

Compress:

  • z: Compress using GZIP
  • c: Create an archive (as opposed to the 'x' parameter to extract)
  • v: Verbose mode
  • f: Archive's filename
$ tar -zcvf filename.tar.gz /directory

Extract:

$ tar -zxvf filename.tar.gz
Filed under: General No Comments
5Jun/102

Ridding Twitter of Annoyances

Fact: Life is tough when you're easily irritated online.

Twitter is an amazing service (if used properly). It's a great way of getting news quickly, and personally, I find it to be a great place to find entertaining people. It definitely has its uses.

With that said, I have to say that every one of us have been annoying to someone, somewhere, at some time. It happens. However, with certain folks, it happens more regularly than others. Look - that's fine. That's what makes us all different. It's also what makes me find you annoying.

The most common solution is unfollowing someone (or taking it a step further by blocking and reporting them for spam). Easier said than done. Sometimes you have a couple conversations with a person and fool yourself into thinking you're friends. It happens. So what to do?

TweetDeck has recently (version 0.34+) implemented an amazing feature: Global filter

A Couple Essentials

Bieber

Let's face it. Justin Bieber exists. He also commands an legion of hormone-crazed teenagers online. Add his name to that filter list, as shown above, and you should be alright though. It's actually a fortunate thing that he has a unique name. So you should be safe to filter it as a word completely.

Formspring

Formspring is a service that allows people to ask questions anonymously. Seems very popular. I've noticed that this happens among people who seem to think they're more famous than they actually are. I don't have any intention of asking you anything.

The easiest solution is to add "www.formspring" as a keyword.

Knitting

No real explanation needed for this one. Just block that keyword and be done with it.

Exaggeration and Excess-Enthusiasm

It's a tough one figuring out the ideal number of exclamation-marks. Which number is ideal? I'm not entirely sure, but 6 has worked well for me (!!!!!!)

Again, it's tough to say how many is the ideal number to filter here. My studies have shown that 5-S's (sssss) is too much.

This is usually an indication that you should probably be following more mature Tweeters. Otherwise, "meeee" is a great keyword to filter.

Affection

"<3": You're better off unfollowing this person completely.

"♥": I wish I could block this, but TweetDeck seems to have some sort of unicode limitations - you might have to put up with this kind of Tweet for the time being.

People using Twitter as an IM service

You've seen this happen. Mutual-friends reply back and forth, then keep going for about 30 or 40 tweets. Amazing. I hate you. Solution: Add both their names to the keyword filter-list with an '@' as a prefix. For example: @AnnoyingPerson

Sources worth filtering

Foursquare

Foursquare is a service that allows people to act exactly like dogs pissing on trees marking their territory. Everybody fights for the "Mayor" position at a restaurant by "checking-in" regularly.

Block it by adding "foursquare" to your 'sources' filter-list.

Twitterfeed

Some Twitter accounts are linked to blogs. Each time a new article is published, a Tweet is published at the same time. I have an RSS reader, and I'm not scared to use it.

API

API almost always is a post by a bot.

Remaining Challenges

"your" versus "you're"

Also known as the Inability to understand the difference between "your" and "you're". If done consistently, this serves as a sure-fire way of determining a person's intellectual capacity. Unfortunately, I haven't been able to find a way of filtering this kind of stupidity other than unfollowing the person completely.

High-frequency Tweeters

Again, I have no solution for this. You might just have to add them to the from-people-list.

Conclusion

This is by no means an exhaustive list. Your annoyance-threshold may vary. If you have more suggestions, please leave a comment below.

Tagged as: 2 Comments
1Jun/100

Ubuntu: Installing Apache, PHP 5, and MySQL 5

Apache

sudo apt-get install apache2

Locations:

  • HTML directory: /var/www
  • Apache2 conf: /etc/apache2/apache2.conf

PHP 5

Install PHP, and also enable the PHP and Rewrite module in Apache:

sudo apt-get install php5
sudo a2enmod php5
sudo a2enmod rewrite

Locations:

  • php.ini: /etc/php5/apache2/php.ini

MySQL 5

sudo apt-get install mysql-server
sudo apt-get install php5-mysql

Restart Apache

sudo /etc/init.d/apache2 restart
22May/100

Oracle: Recovering a Tablespace

The situation:

The database was not shutdown cleanly and a tablespace needed recovery because of an outstanding transaction that wasn’t committed.

If you simply STARTUP the database, the tablespace will still be in RECOVER mode and won’t be available.

First, startup the database in restrict mode:

1
SQL> startup restrict

List all tablespaces and check the ONLINE_STATUS:

1
2
3
4
5
6
7
8
9
10
11
SQL> SELECT tablespace_name, online_status FROM dba_data_files;
 
TABLESPACE_NAME                ONLINE_STATUS
------------------------------ ---------------
USERS                          ONLINE
UNDOTBS1                       ONLINE
SYSAUX                         ONLINE
SYSTEM                         SYSTEM
TEST                           RECOVER
 
5 ROWS selected.

In this case, the TEST tablespace requires recovery:

1
2
3
SQL> RECOVER TABLESPACE TEST;
 
Media recovery complete.

Check tablespaces again:

1
2
3
4
5
6
7
8
9
10
11
SQL> SELECT tablespace_name, online_status FROM dba_data_files;
 
TABLESPACE_NAME                ONLINE_STATUS
------------------------------ --------------
USERS                          ONLINE
UNDOTBS1                       ONLINE
SYSAUX                         ONLINE
SYSTEM                         SYSTEM
TEST                           OFFLINE
 
5 ROWS selected.

The tablespace doesn’t need further recovery at this stage and can be placed ONLINE:

1
2
3
SQL> ALTER TABLESPACE TEST ONLINE;
 
TABLESPACE altered.

Get the database out of restrict mode:

1
2
3
SQL> ALTER SYSTEM DISABLE RESTRICTED SESSION;
 
SYSTEM altered.
22May/100

Oracle: Forcing a checkpoint

A checkpoint makes sure that all changes to the database (that are still in buffers) are written to the datafiles.

1
2
3
SQL> ALTER SYSTEM CHECKPOINT;
 
SYSTEM altered.
Page 1 of 2312345Last »
Bear