Monday, September 29, 2014

Singtel, M1, Starhub Multi-SIM - Setting to Primary SIM



If you are using any of the Singtel, M1 or Starhub Multi-SIM cards, you will have 2 or more SIM card.  However only 1 will be the Primary SIM card.  The rest will be Secondary SIM cards.


Primary SIM cards are able to call out and receive calls
Secondary SIM cards are only able to call out


In order to switch any card to a Primary SIM card, please key in the following in dialer:

SingTel: Dial *141# and press call.
StarHub: Dial *118# and press call.
M1: Dial *136# and press call.


Sunday, September 7, 2014

China Prepaid cards balance enquiry

China Telecom

http://www.189.cn/bj/
Send "1" to "10001".  It will return with a menu of all options.
Send "101" to "10001".  It will return your remaining prepaid value.


China Mobile
Send "113" to "10086".  It will return your remaining prepaid value.


China Unicom
Send "YE" to "10010".  It will return your remaining prepaid value.


Monday, May 26, 2014

Adding Endpoints in batch for Microsoft Azure Virtual Machines

For Virtual Machines in Microsoft Azure, you have to create Endpoints in order for traffic to enter your VM.

You can add Endpoints using the Azure Portal, but you can only do it one at a time.  This is very tedious.

You can use Power Shell to add the Endpoints too.

Start > Windows Azure > Windows Azure PowerShell

This will launch the Windows Power Shell with Azure support.
Execute this command to retrieve the "PublishSettingsFile" for your Azure account.

Get-AzurePublishSettingsFile

This will launch the Windows Power Shell with Azure support.
Execute this command to retrieve the "PublishSettings" file for your Azure account.
Save the PublishSettings" file in your root drive for easier access for the next command.
Execute this command to install the certificate into your certificate store and configure your subscription settings for PowerShell.

Import-AzurePublishSettingsFile "C:\myAzure.publishsettings"

Now you are ready to add the Endpoints in batch mode.
You need to replace the "CloudServiceName" with the name you used in the "Cloud Services" of your Azure account.  Then you need to replace the "VMName" with the name you used in the "Virtual Machines".

You can modify the code to specify your port ranges and the TCP or UDP endpoints.


$vm = Get-AzureVM -ServiceName "CloudServiceName" -Name "VMName";

$i=23401
do
{ 
 $vm |
 Add-AzureEndpoint -LocalPort $i -PublicPort $i -Name iPerfU$i -Protocol TCP | 
 Update-AzureVM; 
 $i+=1
}
until ($i -gt 23409 )