Ramin Hossaini (blog)

1Jan/12

If this, then that (ifttt)

Ifttt is a really handy tool for creating simple triggers that set off actions or tasks. It works off of what ifttt calls "channels" (a particular date & time, Foursquare, Facebook, Flickr, and Evernote are a few examples)

You might find that the "if this, then that" is a bit too simple for certain things you would like to do - I would have loved to see a little more complexity involved. For example, "if this and this, then that".

Here are a couple of examples:

Ifttt is in beta at the moment, and it's free to sign up - but I don't suspect it will stay that way for very long.

Anyways, you might as well try it yourself and start making your own recipes: ifttt

Filed under: Tools No Comments
15Mar/11

Extracting attachments from .EML files

Note: If you're only interested in the download, scroll down to the bottom of the post.

An inconsiderate friend sent me a couple of .eml files with attachments that I had to look through. I downloaded the files and found that I had no associated application to open them. So instead of finding an application to open them, I thought I'd take a closer look at the files:

The top portion had a whole bunch of stuff I had no interest in whatsoever:

After all the HTML, I found the code for the attachment:

So I figured I just had to decode the Base64-encoded data and save it as the filename (in this case, a PDF)

The most logical thing at this point was to write my own application to do it. Just made a simple C# form with a textbox for the Base64-encoded data, a textbox for the filename to write to and a Decode button to get things going:

The Decode function is pretty simple:

1
2
3
4
5
public byte[] decode(string data)
{
    byte[] output = Convert.FromBase64String( data );
    return output;
}

So feed the function the Base64 part and it spits out the good stuff that you just write to a file:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
FileStream fs = new FileStream(txtFilename.Text, FileMode.Create, FileAccess.Write);
BinaryWriter writer = new BinaryWriter(fs);
try
{
    for (int i = 0; i < decodedData.Length; i++)
    {
        writer.Write(decodedData[i]);
    }
}
finally
{
    writer.Close();
    fs.Close();
}

You can also just download the latest version of the app here: Base64 Decoder

The open file function is a bit experimental and does some .EML file clean-up.

It requires the .NET framework and no, it doesn't come supported, and I can't promise that I'll continue working on it.

1Jan/11

An introduction to Yahoo! Pipes

Yahoo! isn't exactly one of my favourite companies out there, and it isn't hard to figure out why when you see how they've acquired and maintained technologies like Delicious and Flickr.

That being said, I have to say I'm a big fan of Yahoo! Pipes, and I haven't been able to find an alternative that's as good.

The name is derived from the Unix pipe where simple commands can be combined together to create output that meets your needs.

Example

So here's a very simple example: let's say you have a specific RSS feed (in this example, the Guardian football RSS feed) you like - but you're only interested in very specific news (in this example, we only want content relating to Liverpool FC).

Go to Yahoo! Pipes and create a new pipe. Then add the RSS feed as input:

Click on the input-box and you should be able to see a preview of what the input is like:

Under the 'Operators' menu on the left, drag a 'filter' module into your pipe, add some rules and then connect the boxes together:

Click on the 'pipe output' box to see a preview of the new output:

Once you've saved your pipe, click on 'Run pipe' and get the output's RSS feed address:

I'm curious to see how others use Yahoo! Pipes - leave a comment if you think of something.

3Sep/10

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

15Oct/09

More Twitter tools

Favstar

Find out who's faved your Tweets

http://favstar.fm

ReTweetist

Find out who's re-tweeted/RT'ed your tweets

http://www.retweetist.com


retweetist

For even more tools, check out my previous post: Twitter Tools

Tagged as: , No Comments
7Oct/09

Twitter tools

Tweetdeck

Personally, I think this is the best Twitter client/interface I've used so far - they also have a version available for the iPhone.


tweetdeck1

Get Tweetdeck

TweetStats

Find out more about your Tweeting-patterns:


tweetstats

TweetStats

Twitalyzer

Find out about your Twitter 'influence', 'signal', 'generosity', 'velocity' and 'clout':


twitalyzer

Twitalyzer

TweetPsych

This is interesting - build a psychological profile of a person based on the content of their tweets:


tweetpsych

TweetPsych

Twitter Karma

Find out who isn't following you back and who you're not following:


twitterkarma

Twitter Karma

BackTweets

Lets you search for links on twitter (even through URL shorteners). Useful if you want to see who's been tweeting about your website. They also have a WordPress plugin for it.


backtweets

BackTweets

Twuffer

Twuffer is a "Twitter Buffer" that allows you to schedule tweets for a later time


twuffer

Twuffer

Qwitter

Qwitter lets you know when someone has stopped following you


qwitter

Qwitter

Did I miss something? Let me know in the comments. You can also follow me on twitter

Tagged as: No Comments
6Oct/09

Creating a tunnel and SOCKS proxy with Putty

Why?

  • Secure a public WiFi connection
  • Bypass country-specific-content websites (e.g sites that only allow users from the U.S)
  • Connect to a remotely-secured MySQL database via localhost

It's pretty easy to do in Linux (and I think the command is pretty much the same in MacOS or with cygwin installed):

ssh -L localport:hostname:remoteport username@Server

This is how to do it with Putty

Open Putty and enter in the basics: the Server and port (22):

putty1

Next, create the tunnel. Enter the source port (in this example, it's 3306 - a MySQL port) and leave the destination field empty (not always left blank, but it works for most cases)

putty2

The tunnel will be open/active as soon as you've logged in. Obviously, you still have to set up your proxy settings in whatever application you're using (for those who don't know, 127.0.0.1 is 'localhost'):

proxy

Page 1 of 512345
Bear