Thursday, 22 August 2013

Running Ultrasurf in Ubuntu

Proxy servers become handy when you want to unblock a website or when you want to automate website querying. Ultrasurf provides the functionality of a proxy server. It runs a local proxy server at 127.0.0.1:9666. Here 127.0.0.1 is the IP address (localhost) and 9666 is the port used by the local Ultrasurf proxy server. You can change your browser proxy settings to point to this proxy server and start browsing.

Ultrasurf is a very useful tool if you are looking for secure proxy connections and if you have the need to change the proxy servers frequently.

In this article I present the steps to run ultrasurf in Ubuntu.


I used the following in the steps described in this article:

1. ubuntu 12.04 lts

2. ultrasurf 13.01

3. wine 1.5


Steps:


1. Install wine 1.5 using terminal/command prompt - use folllowing commands in the given sequence
    $ sudo add-apt-repository ppa:ubuntu-wine/ppa
    $ sudo apt-get update
    $ sudo apt-get install wine1.5
Please check http://www.winehq.org/ for more information on wine!

2. Download ultrasurf from http://ultrasurf.us/ and extract to any folder you prefer.

3. Run ultrasurf by double-clicking on the executable ultrasurf file u1301.exe. Alternately, the application can be launched by the following command:
    $ wine u1301.exe

In one of my upcoming posts, I will explain how Ultrasurf can be used along with python programming language to auomate website queries.

Monday, 19 August 2013

Recipe for a an awesome Condensed Milk Pudding!





I would like to share the recipe for the condensed milk pudding that I make every weekend! I make condensed milk pudding with simple ingredients and it takes me very little time, as low as 20 minutes!

Ingredients:

1. Condensed milk - 1 tin

2. 2% Normal Milk - 1.5 tins

3. Eggs - 3

4. Vanilla flavor

5. Food coloring

6. Cashew nuts



Steps:

1. Mix 1 tin condensed milk with 1.5 tin of milk. 

2. Use a blender to beat 3 eggs and add that to the above mixture. Do not beat for too long to avoid the eggs getting cooked.

3. Add few drops of vanilla flavor and few drops of food coloring (if u prefer colored pudding).

4. Boil it for 20 mins on medium. Or, steam for about 45 minutes (duration specified for electric steamer).

5. Add crushed cashew nuts.

6. Let it cool and refrigerate for 4-5 hours.

7. Ready to eat!



Thursday, 15 August 2013

'Stop Sell Order' in stock trading

I would like share my experience with a particular stock I traded and the lesson I learnt from the process.

I had bought this penny stock (priced below a dollar) in Toronto Stock Exchange (TSE) and held it for couple of weeks expecting the price to go up. It did once for a short period of time but started dropping since then. However, I wasn't ready to sell it, instead I bought more of the same stock expecting the price to go higher.

After a few days, to my surprise and disappointment, the stock was delisted from TSE. It wasn't a total loss for me as the company did not go bankrupt; the stocks were transferred to another exchange. Even though I had the option of selling the stock at this other exchange, I was reluctant due to the very high trading fees we have to pay to trade at an exchange overseas.

From this I learnt it is important to minimize losses in stock trading in addition to focusing on making profits. Since then, I place a stop order at the very moment I buy a stock. Stop order helps to minimize losses.

Stop Sell limit order has 3 factors:
 
1. Stop price - the price at which you want to your stop order to become a limit order.
2. Stop limit - your 'ask price' for the limit order.
3. Quantity - the number of shares you would like to sell.

Note that, there is a difference between 'Stop Order' and 'Stop Limit Order'. The difference is 'Stop Limit'. In a 'Stop Order' there is no 'Stop Limit'. In this case, when the 'Stop Price' is triggered, the 'Stop Order' becomes a 'Market Order'. On the other hand, in the presence of a 'Stop Limit' price, when the 'Stop Price' is triggered, the 'Stop Order' becomes a 'Limit Order'.

By placing a stop order we can minimize losses. We do not need to keep checking the prices all the time to place a sell order. Stop order will take care of it.

I use the following to determine my stop price:

SP  =  (PP * Q + 2 * TF ) *  0.9 / Q

SP  - Stop Price
PP  - Purchase Price
Q    - Quantity
TF  - Trading Fee
0.9 - This value is chosen as my loss threshold

Let us consider an example. Suppose  we bough 100 shares at $10.00 each and the trading fee is $30 per trade. Thus, PP = 10, TF = 30 and Q = 100. Hence,

SP = (10 * 100 + 2 * 30) * 0.9 / 100 = $9.54