Monday, November 18, 2013

EXIM and AWS SES

The Amazon documentation says edit the exim.conf file, but it did not work for me. Editing the exim.conf.template did.

sudo dpkg-reconfigure exim4-config
Leave everything as default except changing the relay server to AWS SES

To configure integration using STARTTLS

Edit the /etc/exim/exim.conf.template file. If the file does not exist, create it. In this file, make the following changes:

In the routers section, after the begin routers line, add the following:

send_via_ses:
driver = manualroute
domains = ! +local_domains
transport = ses_smtp
route_list = * email-smtp.us-east-1.amazonaws.com

In the transports section, after the begin transports line, add the following:
ses_smtp:
driver = smtp
port = 25
hosts_require_auth = $host_address
hosts_require_tls = $host_address

In the authenticators section, after the begin authenticators line, add the following, replacing USERNAME and PASSWORD with your SMTP user name and password:
Important: Use your SMTP user name and password, not your AWS access key ID and secret access key. Your SMTP credentials and your AWS credentials are not the same. For information about how to obtain your SMTP credentials, see Obtaining Your Amazon SES SMTP Credentials.
ses_login:
driver = plaintext
public_name = LOGIN
client_send = : USERNAME : PASSWORD #obtain this information from AWS SES
Save the /etc/exim/exim.conf.template file.

Look for this section:
login:                                                                                              
  driver = plaintext                                                                                
  public_name = LOGIN                                                              

Change the LOGIN to OLD_LOGIN

Restart the exim4 service

Wednesday, November 6, 2013

NBA League Pass is Not Cord Cutting


The NBA 2013-14 season has just started. There are many story lines in the NBA such as can Miami Heat get their third NBA championship, can Kobe Bryant returns to the NBA after a serious injury, or the return of Derrick Rose. These stories will make people to watch when these teams and players take on the court.

One way to watch the NBA is through local televise TV, ESPN, TNT, or NBA TV. These channels televise local teams or the teams that the channels chooses. The NBA introduces another way to watch NBA games if fans want more. It is through the NBA League Pass.

The NBA League Pass allows NBA fans to watch NBA games on TV, online, or on their mobile devices. It sounds great for NBA fans because you can watch any game any time, however, the restriction of the league pass makes it very unattractive to sign up for.

At the beginning of the season until November 5, the NBA allows free access to their league pass. I will just use these days for analysis.

First, let's take a look at the rules of league pass black out, meaning you cannot watch these games online or your mobile devices.

  1. National televise games
  2. Local team(s) game. 
National televise games means if the games are on national TV. In this season, it will be ABC, ESPN, TNT, and NBA TV. 

Local teams means the team is playing in your city or surrounding city. That means if you lives in Chicago, there is no Chicago Bulls coverage on your NBA league pass. 

Let's take a look at the first 3 days. 

10/29: 
ORL vs IND
CHI vs MIA
LAC vs LAL

None of these games can be watched on league pass because they are all nationally televised. 

10/30:
BKN vs CLE
MIA vs PHI
BOS vs TOR
WAS vs DET
MIL vs NYK
CHA vs HOU
ORL vs MIN
IND vs NOP
ATL vs DAL
MEM vs SAS
OKC vs UTA
POR vs PHX
DEN vs SAC
LAL vs GSW

OK, there is a lot of games to watch. We will stick with the games that most people want to watch because both teams had winning records and in the playoff last season. 
MEM vs SAS - YES
LAL vs GSW - No because it is on NBA TV
Therefore, only 1 game is worth to watch. 

10/31:
NYK vs CHI
GSW vs LAC
None, all the games are on TNT. 

11/1:
CLE vs CHA
NOP vs ORL
PHI vs WAS
TOR vs ATL
MIL vs BOS
DAL vs HOU
DET vs MEM
OKC vs MIN
MIA vs BKN
POR vs DEN
UTA vs PHX
LAC vs SAC
SAS vs LAL

Another night with a lot of games to watch. Let's see what's good on the league pass. 
OKC vs MIN, yes.
MIA vs BKN, no because it is on ESPN
SAS vs LAL, no because it is on ESPN
Again, only 1 game is worth to watch. 

Fans most likely support their local team(s). If these fans do not have access to cable television, they cannot watch anywhere. 

As the NBA is getting more and more popular and faster style of play, the NBA can capture more younger audience who most likely prefer to watch the NBA games on their personal devices. I am hoping that NBA league pass will change their blackout restriction policy and more games to display through their league pass. 

The league pass improved this season by allowing national games plays via archive. However, sports is more fun when it is live. 

Sunday, September 22, 2013

Grading the commodity shops

I had an interesting conversation the other day comparing stores based on the Walmart and Mcdonald standard. The following is a comparison.

Walmart < Target/Trader Joe's/Fresh and easy < Whole Foods
Mcdonald < Jack in the box/Wendy's < In N Out/5 Guys and a burger
Starbucks < Seattle's best/Coffee & Tea's leaf < Peet's coffee

The comparison is totally bias, of course. 

On the other hand, the brand store on the left has more stores to the stores on the right, possibly more profitable as well.

Thursday, September 19, 2013

Update layout 2013

Just another update on the layout. Now it is nice and clean. 

Sunday, August 18, 2013

AngularJS with Symphony2


 + 


AngularJS is great. I personally think it is an upgrade from jQuery.

I have been testing AngularJS with Symfony2. One of the problems to build a web application with these two frameworks is that Symfony2's twig language uses the same symbol operator.

For example: PHP uses <?php ?>, AngularJS uses {{ }}, and Symfony2's twig uses {{ }} as well.

The solution is to change the default AngularJS symbol to something else.

After your page finish loading the AngularJS, in your script, add the following function:

angular.module('apps', [])
.config(['$interpolateProvider', function ($interpolateProvider) {
    $interpolateProvider.startSymbol('[[');
    $interpolateProvider.endSymbol(']]');
    }]);

It change the symbol operator from using {{ }} to using [[ ]]. 

Remember, you also need to define your app in your html code inside the <html>. In this case, I define the AngularJS app to use apps, therefore, in my <html ng-app>, I need to define it using <html ng-app="apps">

Have fun coding!