Saturday, December 16, 2017

Penang buffet lunch promotions

Last updated: 12/16/2017

The information is compiled, to my best effort, from other websites, newspaper, and directory listing and MAY NOT REFLECT the most updated information.
Please call directly or go to the official website for the hotels listed for an accurate description.

Place Day Adult Child Remarks Contact
360 at the TOP Sun 58   Until Feb 2018  
Bayview Beach Sun 42 24   6048812123
Café Jen Daily 68   International buffet 6042622622
E&O Mon-Fri 79.3 39.65   6042222000
E&O Sat-Sun 86.3 43.15    
Eastin Mon-Fri 70 35 Executive lunch 6046121128
Eastin Sun 88 34 Eat and swim Sunday  
Equatorial Sat-Sun 98 49 Kampachi 6046327000
Flamingo Hotel Sun 28     6048927111
Four points Sun 54 27    
G Hotel Daily 95   International; buy 2 free 1 Dec 2017 6042380000
Lexis Suites Sunday 88 50 Umi japanese restaurant 6046262888
Lone Pine Sun 85 42.5    
Olive Tree Sat 60 30 Amazing Thai  
Parkroyal Sun 68   Gourmet buffet lunch 6048811133
Rasa Sayang Sun 103 53.3   6048888888
Royale Chulan Penang Sun 62 32 High tea  
St Giles Wembley Thurs 68 34 Japanese and western 6042598000
St Giles Wembley Fri 68 34 Seafood  
St Giles Wembley Sat 68 34 Japanese and Seafood  
St Giles Wembley Sun 68 34 Oriental hi tea  
Sunway Hotel Sat-Sun 28     6042299988
Vistana Hotel Daily 45 22.5 International buffet  

Penang buffet dinner promotions

I thought it would be handy to share (and for myself to refer to this list from time to time when running out of ideas for dinner. In Penang. Really).

Last updated: 12/16/2017

The information is compiled, to my best effort, from other websites, newspapers, and directory listings and MIGHT NOT REFLECT the most updated information.
Please call directly or go to the official website for the hotels listed for an accurate description.


Place Day Adult Child Remarks Contact
360 at the TOP Daily 88   Nyonya and local; Reservation mandatory 6042613540
Café Jen Fri 95   Fisherman's catch  
Café Jen Sat 95   Let's grill  
Cititel Fri 95 48 Seafood promotion 6042911128
Copthorne Orchid Saturday 42 25 Nyonya buffet 6048923333
E&O Sun-Thes 133.3 60.95    
E&O Fri-Sat 133.3 60.95 Add on 66 for alchohol  
Eastin Fri-Sat 110 55 add on 60 for alchohol  
Equatorial Sat 128 64 Kampachi japanese  
Equatorial Fri 128 64 Sensational seafood @ nada lama  
Equatorial Sat 128 64 Carvery buffet @ nada lama  
Flamingo Hotel Fri 76 40    
Flamingo Hotel Sat 85 45 BBQ and Carvery  
Four points Sat 84 42 BBQ and Carvery  
G Hotel Sun-Thur 120   International buffet  
G Hotel Fri-Sat 155   Lava Stone  
G Kelawai Sun-Thur 75   International buffet 6042190000
G Kelawai Fri-Sat 105   Japanese Buffet  
Golden Sands Thurs 98     6048861911
Golden Sands Sat 108   Seafood Heaven with drinks  
Golden Sands Fri 108   Sigi  
Golden Sands Sun 108   Sigi Beach BBQ  
Hard Rock Sat 99 59 Seafood on the rocks 6048811711
Holiday Inn Daily 75     6048866666
Hotel Royal Fri-Sat 41.99 31.99 Royal Buffet Dinner 6042267888
Icnonic Hotel  Fri-Sun 108 54 Seafood 6045059988
Ixora Hotel Sat 78 48 Seafood and BBQ 6043821111
Lone Pine Fri-Sat 102.6 67.6 Seafood BBQ 604886856
Lone Pine Thurs 79.3 39 Flaming roast and Grill  
Maritime Waterfront  Fri 68.9 44 BBQ 6043763797
Olive Tree Daily 88 44 Seafood 6046377777
Parkroyal Fri 148 38 Sunset BBQ and Carvery  
Parkroyal Sat 135 38 Seafood  
Parkroyal Sun 55 27.5    
Rasa Sayang Thurs 98 49 Sunset BBQ  
Rasa Sayang Fri-Sat 198 99 Seafood buffet  
Rasa Sayang Sun-Thur 169 85 International buffet  
Royale Chulan Penang Fri 88 44 Poolside BBQ 6042598888
Royale Chulan Penang Sat 70 35 Hawker's Delight  
St Giles Wembley Mon 95 48 Herbs and Spices  
St Giles Wembley Tue 95 48 Mediterranean  
St Giles Wembley Wed 95 48 Thai  
St Giles Wembley Thurs 95 48 Japanese and western  
St Giles Wembley Fri 95 48 Seafood  
St Giles Wembley Sat 108 54 Japanese and Seafood  
St Giles Wembley Sun 108 54 Oriental  
Sunway Hotel Wed 48 28 Hawker's buffet  
Sunway Hotel Fri-Sat 58 35 Barbeque  
Sunway Seberang Jaya Fri-Sat 45 35 Village Flavour 6043707788
Vistana Hotel Daily 55 27.5 International buffet 6046468000
Vouk Hotel  Fri-Sat 65   Seafood and Japanese buffet 6043708333

Monday, July 31, 2017

PowerShell and Exchange Web Services (EWS) script to parse bounced emails

In my previous post, I had shared how to run PowerShell scripts on a locally configured Outlook profile, with Windows 10 powershell.

In this post, we will be making use of EWS to connect to an exchange server, impersonate a system maibox, download the emails and parsing the email body to extract the bounced email recipient.

References:
https://goodworkaround.com/2015/01/29/powershell-and-ews-managed-api/
https://msdn.microsoft.com/en-us/library/office/jj900168(v=exchg.150).aspx
https://www.linkedin.com/pulse/how-use-date-range-search-query-ews-managed-api-using-sunil-chauhan

What you need:
Microsoft Exchange Web Services API (download from nuget)

If you do not know which version of Exchange server your outlook profile is hosted on, refer to this article:

The script will attempt to detect a pre-embedded header. I find that this is the easiest way of detection since I have control over the email sending mechanism as well.
Example: in my email sending script (vbs sample here), I embed a header field
With Flds
' Set custom header so that the email can be easily read from bounce back addresses
.Item("urn:schemas:mailheader:x-CustomHdr") = strRecipientEmail
.Update
End With

Full source code:

Friday, July 28, 2017

PowerShell script (client machine) to parse bounced emails from Outlook

PowerShell script tested on Windows 10, with Outlook 2016 installed.
This is only meant for machines with Outlook connected to at least one email.

The script will attempt to parse bounced emails based on certain text patterns and attempt to extract the recipient email from a custom header. Assuming the custom header is set during send time.
Emails are extracted and saved to a SQL server database by invoking a stored procedure.

 Clear-host  
 Add-Type -Assembly "Microsoft.Office.Interop.Outlook"  
 $Outlook = New-Object -ComObject Outlook.Application  
 $Namespace = $Outlook.GetNameSpace("MAPI")  
 $mb = $Namespace.Folders | ?{$_.name -match "testabc@test.com"}    
 $Inbox = $mb.Folders | ?{$_.Name -match "Inbox"}    
 
# Clear deleted items > 30 days  
 $cutOff = (get-date).AddDays(-30)  
 $DeletedItems = $mb.Folders | ? { $_.Name -match 'Deleted Items' };  
 Foreach($e in $DeletedItems.Items){  
   if ($item.SentOn -gt $cutOff) {  
     $e.delete()  
   }  
 }  
 
# A bug in Outlook 2013 and 2016 will not display bounced emails properly  
 $uEnc = New-Object System.Text.UnicodeEncoding  
 $enc = [system.Text.Encoding]::UTF8  
 $dataSource = "dbservername"  
 $database = "dbname"  
 $dbUser = "user"  
 $pwd = "pwd"  
 $connectionString = "Data Source=$dataSource; User Id=$dbUser; Password=$pwd; Initial Catalog=$database"  
 $connection = new-object system.data.SqlClient.SQLConnection($connectionString)  
 $connection.Open()  
 #---------------------------------------------------------------------------------  
 # Function to pass in SQL query and return results as a table  
 #---------------------------------------------------------------------------------  
 function Invoke-SQL {  
   param(  
     [string] $sqlCommand = $(throw "Please specify a query.")  
    )  
   $command = new-object system.data.sqlclient.sqlcommand($sqlCommand,$connection)  
      if ($command.ExecuteNonQuery() -ne 1)  
      {  
           Write-Host "Failed to execute SQL: $sqlCommand";  
      }  
 }  
 function Update-InvalidEmail  
 {  
   param(  
     [string] $email,  
     [string] $subject  
   )  
   If ($email.length -gt 100)  
   {  
     $email = $email.Substring(0,100)  
   }   
   If ($subject.length -gt 500)  
   {  
     $subject = $subject.Substring(0,500)  
   }   
      $email = $email.Replace("'", "''")  
   $subject = $subject.Replace("'", "''")  
      $strSQL = "sp_UpdateInvalidEmails '$email', '$subject'"  
   $dt = Invoke-SQL -sqlCommand $strSQL -returnResults $false  
   $dt  
 }  
 #checks newest messages  
 $Inbox.items | select -first 100 | foreach {  
   $subject = $_.Subject  
   $body = $enc.GetString($uEnc.GetBytes($_.Body))  
   if ($body -like "*Delivery has failed to these recipients*") {  
     write-host "failed delivery detected" -ForegroundColor Cyan  
     # look for lines like this: x-CustomHdr: email@test.com  
     # x-CustomHdr is a custom header 
     $regex = '\sx-CustomHdr:\s*([\w_.+-]+@[\w-]+\.[\w-.]+)\s'  
     $found = $body -match $regex  
     if ($found) {  
       $emailAddr = $matches[1]  
       write-host $emailAddr  
       Update-InvalidEmail -email $emailAddr -subject $subject  
     }  
   }  
   $_.Delete()  
 }  
 $connection.Close()  
 $connection.Dispose()  

Tuesday, May 16, 2017

SQL - Remove duplicate rows

Neat query to remove duplicate rows (MSSQL)

Assuming I have a table with auto-increment id

DELETE FROM MyTable
WHERE id NOT IN (SELECT MIN(id) FROM MyTable GROUP BY UniqueCol1, UniqueCol2);

Wednesday, January 4, 2017

PowerShell SharePoint to cancel workflows

$ver = $host | select version
if ($ver.Version.Major -gt 1) {$Host.Runspace.ThreadOptions = "ReuseThread"}
Add-PsSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

$TargetWeb = "http://sharepoint/"
$TargetLibrary = "Library"
$Filename = 133 # the item ID
 
$MyWeb = Get-SPWeb $TargetWeb
$list = $MyWeb.Lists[$TargetLibrary]
$item = $list.GetItemById($Filename)

foreach ($wf in $item.Workflows) {
#Cancel Workflows      
[Microsoft.SharePoint.Workflow.SPWorkflowManager]::CancelWorkflow($wf);    
}

WRITE-HOST "Discarded workflows"

Tuesday, January 3, 2017

SharePoint and PowerShell: Updating an individual user profile properties

When a user cannot be found from SharePoint central administration by going to Service Applications - User Profile Service - Manage User Profiles, it is likely that this user had some synchronization issues that is preventing detection from the UI.

In my situation the user was originally sync'd from Active Directory, but we had some OU changes and broke the hierarchy.
It's PowerShell to the rescue!

This example will retrieve a user profile from the web application, and updates the preferred name and user manager.

#Set up default variables
$mySiteUrl = "http://mysites"
$adAccount = "DOMAIN\username"
$upAttribute = "PreferredName"
$upAttributeValue = "My New Name"

#Get site objects and connect to User Profile Manager service
$site = Get-SPSite $mySiteUrl
$context = Get-SPServiceContext $site
$profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context)

#Check to see if user profile exists
if ($profileManager.UserExists($adAccount))
{
    #Get user profile and change the value
    $up = $profileManager.GetUserProfile($adAccount)
    $up["PreferredName"]
    $up["Manager"]
    
    #$up["PreferredName"].Value = $upAttributeValue
    #$up.Commit()

    $up["Manager"].Value = "DOMAIN\manager"
    $up.Commit()
}
else
{
    write-host "Profile for user"$adAccount "cannot be found"
}


#Dispose of site object
$site.Dispose()
Related Posts Plugin for WordPress, Blogger...