Wednesday, September 12, 2012

HOWTO: 2Wire 3600HGV + Airport Extreme


AT&T's new router -- the 2Wire 3600HGV -- doesn't have a true bridge mode.  This is a problem if you'd rather have a plain old DSL modem delegating DHCP and NAT to their router.  There is, however, a way to get the 3600HGV into a bridge-like mode.  There is a succinct version of how to do this floating around the internet, but here I've added the specific key presses needed in the specific case of connecting to an Airport Extreme.  The bullet points below are my annotations.

If you haven't already, disable the wireless on the 2Wire:


1. http://192.168.1.254/
2. Settings > LAN > Wireless
3. Set the following options:
  Wireless interface: [disabled]
  Wi-Fi Protected setup: [disabled]
  SSID Broadcast: [disabled]
4. Click "save" at the bottom of the page.
  You will need your gateway's password to confirm the changes.

Now put the 2Wire into a bridge-like mode:


1. Set your router's WAN interface to get an IP address via DHCP. This is required at first so that the 2Wire recognizes your router.
- Open Airport Utility on mac or windows
- Right click Airport icon at left > Manual Setup
- Internet > Internet Connection > Connection Sharing: Off (Bridge Mode)

2. Plug your router's WAN interface to one of the 2Wire's LAN interfaces.
- Connect AT&T modem to Airport Extreme with ethernet.

3. Restart your router, let it get an IP address via DHCP.
- Update, Continue.

4. Log into the 2Wire router's interface. Go to Settings -> Firewall -> Applications, Pinholes, and DMZ
- http://192.168.1.254

5. Select your router under section (1).
- Choose [your router]

6. Click the DMZPlus button under section (2).

7. Click the Save button.
- password: [see sticker on bottom of 2Wire modem]

8. Restart your router, when it gets an address via DHCP again, it will be the public outside IP address. At this point, you can leave your router in DHCP mode (make sure the firewall on your router allows the DHCP renewal packets, which will occur every 10 minutes), or you can change your router's IP address assignment on the WAN interface to static, and use the same settings it received via DHCP.
- Go to Airport Utility
- Summary > IP Address: [should NOT look like 192.blah.blah.blah]
- Right click on Airport icon at left > Restart... [wait]
- Internet > Internet Connection > Connection Sharing: Share a public IP address
- I think he means "...you can PUT your router INTO DHCP mode..." which is the only thing that makes sense, since this is the point of the whole exercise.  I have no idea what to do with respect to the rest of the sentence.  Not sure if this applies to Airport Extreme or not.

9. On the 2Wire router go to Settings -> Firewall -> Advanced Configuration
- http://192.168.1.254

10. Uncheck the following: Stealth Mode, Block Ping, Strict UDP Session Control.

11. Check everything under Outbound Protocol Control except NetBIOS.

12. Uncheck NetBIOS under Inbound Protocol Control.

13. Uncheck all the Attack Detection checkboxes (7 of them).

14. Click Save.
- I had to restart my Airport Extreme to get the DHCP working on the Airport.



Some Notes:

1. I found this tidbit about how things might get reverted:

the 2wire router that's supplied for UVerse is awful. Follow the directions in post 2 of the link below to get it to work nicely with an AEBS, thats what i do and it works without any hitches, except when AT&T force software update and it switches it back to factory settings. You'll know thats happened though as the AEBS will start to complain about double-NAT.
http://forums.att.com/t5/Residential-Gateway/U-verse-for-BUSINESS-2Wire-3600HGV-bridge-mode-or-another-AT-amp/td-p/2707031


2.  (Optional) Confirm that your devices have IP addresses assigned by Airport Extreme; by default they are 10.0.1.*.  Check then in Airport Utility > Airport > Summary > Wireless Clients > DHCP Clients.  See column "IP Address".

3. (Optional) On the 2Wire router: Settings > LAN > Status > Devices > Clear List, if you have many listed besides your router.  After this, only your router should remain on the list.

Thursday, March 17, 2011

Android Calendar Bug (Android 2.3.3)

BUG: the "month" view is sticky, and you want a different view to be default
Notes
SOLUTION:

If you exit using the home button in most cases it should return to wherever you were last.

If you exit using the back button there is a magical dance to force a view to be the default. First, go to the view you want to be default, then go to the other three views, then press back until you exit the app. The view you want as default should be the last one to show up before the app exits.

Tuesday, February 16, 2010

Public Buzz == Blog Post

One analogy that has helped me is to think of Public Buzz posting as blogging. Here are some similarities:

1. Posts/Buzzes are inherently public to the world
2. Posts/Buzzes are discoverable via search
3. You have no control over who subscribes to your blog via RSS, just as you have no control over who "follows" you.
4. You have no control over who puts comments on your blog/buzz. This gives hints about those who might be subscribers/followers, but not really because commenting is open to the world.

One non-similarity is that with a blog you don't know how many people are subscribed; in buzz, you do.

Tuesday, January 19, 2010

Vizio VF550M + Comcast Problem (and Workaround)



The Vizio VF550M television has a weird interaction with Comcast Cable at least in the San Francisco Bay Area: replicated channels.

Upon doing a full channel scan during setup, some lowers channels get replicated to channels in the 200s. For example, channel 244-1 is identical to 44-1. The problem is that the "skip channel" feature doesn't allow you to delete these redundant channels! Careful research revealed that all of these 200+ channels get added as a results of scanning the physical channels 81 and 93. So if you do a "partial channel search" and avoid channels 81 and 93, you can work around the problem channels by not adding them in the first place. In other words, do partial channel search 3 times with these ranges: 1 - 80, 82 - 92, and 93-135.

Of course, there are some casualties. TNT, TBS and some sports channels also come in under channels 81 and 93. So I had to give them up. For me that was an acceptable loss, but if you need them, you'll have to live with the redundant 200+ channels.

Sunday, November 8, 2009

The Unique Skill of Understanding a Foreign Language

Daniel Tammet said
"It's one thing to learn a language it, to speak it, to produce it, to be able to talk with somebody. Comprehension, actually listening to a language and understanding it, that's something else because it takes time for the ear to get used to the totally different sounds"

Additionally, written language and spoken are often quite different. The vocabulary is different, and grammar rules are not respected. At least in English and Portuguese there are a tremendous number of sounds that are dropped when compared with written language. Ultimately, what got me over the hump was to recognize groups of sounds/words that occur together frequently and hear them as a single word.

For example, a Brazilian telling a story will start many sentences with "D-F-L". I finally asked someone what that mysterious word was. Turns out they are saying "Dai, eu falei" or "Dai, ele(a) falou" ("And then I said" or "And then (s)he said") The actual phrase has 5 syllables, while the compressed one is nearly 1. You wouldn't come across this phrase in any book and maybe not even on TV. It is something unique to natural, unplanned conversation.

So imagine that the spoken and written language are two different languages altogether. What are the implications? It means that you need to build up a vocabulary of sound groups. These will form the "vocabulary" of the spoken language. This is a hard task because it is usually not written down anywhere. But if you have access to native speakers, you can ask them questions just as I did. And I found that having even a small vocabulary of such "sound groups" goes a long way.

There are at least two benefits to thinking about written vs. spoken language this way. First, you will have less and less of a problem with people speaking too fast because you won't be translating from spoken language to written language (and then possibly back into your own language). You will hear a phrase and treat it as a single idea.

Second, you won't feel so bad that your comprehension skills are low because you'll realize that the task is actually quite difficult--you are learning 2 languages, not just one!

Thursday, November 5, 2009

SVD, PCA, Eigenvectors and all that

Principal Component Analysis (PCA) provides matrices E,L given a symmetric real matrix C such that CE=EL. The columns of E are the eigenvectors and L is a diagonal matrix with eigenvalues on the diagonal.

Singular Value Decompsition (SVD) decomposes an arbitrary real matrix A as A=USV' where U'U=1, V'V=1 and S nonzero only on the diagonal. Thus A'A=V(S^2)V' so that (A'A)V=V(S^2). Comparing this with CE = EL from PCA shows that V holds the eigenvectors and S^2 are the eigenvalues of A'A. To summarize,

SVD(A) gives eigenvectors of A'A. (1)

In applications we often start with a data matrix A where feature vectors are the rows of A. For example, suppose we have a data matrix where each row is an RGB triple that records color samples of skin. We might be interested in extracting a single direction that best approximates this distribution. To do this we first center the data (subtract the mean RGB triple from all rows of A) and find the principal eigenvector of the distribution. Computationally, we let B=[centered version of A], then SVD(B) yields the eigenvectors of B'B. A numerical example is given in [1].

What happens if we start with a symmetric matrix C instead of a data matrix A? For example, each entry c(i,j) could be a direct measurement of similarity between item i and item j as opposed to being computed as a bunch of products as in C = B'B above. Can we still use SVD to get eigenvectors of C? Because according to (1), SVD(C) gives the eigenvectors of C'C, not C.

We can. SVD(C) gives us the eigendecomposition C'C=VSV'. But C symmetric means C'C=C^2 and so C^2=VSV'. Then we can apply the power trick: A^k=Q(D^k)inv(Q) letting k=1/2 so that C=V(S^(1/2))V'.

SVD(C) gives eigenvectors of C when C is symmetric (2)

Note: It is often said that U and V are "the same by symmetry" when C is symmetric. Precisely how? For example, let C = [0 1; 1 0]. Then SVD yields U=S=1 and V=C. In particular, U is NOT equal to V. (This also shows the fallacy of reasoning that USV'=C=C'=VSU' implies that U=V). However, it IS the case that U and V are the same up to a column permutation. Why? SVD(C) gives the eigenvectors of C'C in the columns of V. SVD(C') gives the eigenvectors of CC' in the columns of U. When C'=C it follows that C'C = CC' so that U and V both "hold" the same eigenvectors, up to column permutation.


[1] GNU Octave example

octave:32> a = rand(5,3);
octave:33> b = a - repmat(mean(a),5,1);
octave:34> c = b' * b;
octave:35> [eigen, lambda] = eig(c)
eigen =

0.55689 0.59340 0.58116
0.56566 -0.78331 0.25778
-0.60820 -0.18518 0.77189

lambda =

0.19666 0.00000 0.00000
0.00000 0.22855 0.00000
0.00000 0.00000 0.74406

octave:36> [u,s,v] = svd(b);
octave:37> v
v =

-0.58116 0.59340 -0.55689
-0.25778 -0.78331 -0.56566
-0.77189 -0.18518 0.60820

octave:38> diag(s) .* diag(s)
ans =

0.74406
0.22855
0.19666

Friday, October 16, 2009

PG&E Dishwasher Rebate HOWTO




2. Fill out page 3. The tricky parts are:

Section 1
- PG&E Account Number is on your bill at the top left
- PG&E Electric Service ID is on the 2nd page at the top just under "Electric Account Detail"

Section 4
- Service ID # is the same as in section 1
- Product Code : "B35" or "B20". See page 1 of the pdf. They are listed in blue.
- Manufacturer: see dishwasher list
- Model #: see dishwasher list
- Unit Measure: "dishwasher"

3. Print and sign. Send in together with:

A. Retailer/Contractor name, address, and phone number
B. Itemized listing of each product including quantity, product description, manufacturer, model number, or other identifying information, i.e., SKU # as appropriate
C. Purchase price per product
D. Date “Paid in Full” or payment terms, such as “Charge” or “Net 30”
E. Product installation date

Tuesday, August 4, 2009

Bye Bye Yelp

I'm sad. I've decided to pull the plug on Yelp, a website that I really love. Why?

Well, the evidence of extortion is just too big to be ignored. It's not hard to find. I just searched for [yelp extortion] and turned up about 50,000 articles. Now accusations are not the same as being guilty for sure. So here is why I believe it.

1. The fact that so many people's stories are similar. These are people who are not in contact with each--how is it that they all have very similar experiences with Yelp management? It is hard for only 2 criminals to agree on a story to tell, much less hundreds of people.

2. Much more damning is my personal experience with Yelp. One of my reviews does not show up unless I'm logged in. (Evidently, they are smart enough to not filter out your review when they know you are looking.) When it was 5 stars I could see it, but when I updated it to 3 stars, it magically got dropped from the list of reviews! FISHY. And others have experienced the same.

So I'm pulling the plug, and deleting my account. Who knows if yelp will honor my wishes and actually delete my reviews?!

P.S. For those of you who think "Well, it doesn't affect me so I'll keep using yelp" consider this: how many restaurants will you waste your money on because the ratings were manipulated?

Friday, June 26, 2009

Get out of town

Sometimes I want a quick getaway, but don't have a particular destination in mind. Wouldn't it be great to say: "find all flights leaving SFO (or nearby) for under $400". Kayak now has this, but it is hidden away in "Buzz"--who picked that name?!!!

http://www.kayak.com/buzz

Sunday, June 7, 2009

Craigslist Scammer!

I'd always read about scammers on craigslist, but today was the first time I actually got hit up by one. Here it is, for your viewing pleasure:

From: peterchris002 chris (peterchris002@gmail.com)
Date: Sat, Jun 6, 2009 at 10:30 PM

Thank you very much for your swift response and for telling me the Item is still available.I want to let you know that i'm a deaf man and i am satisfied with the conditions has you have stated in the craigslist.

I have a schedule already,for i need to attend an important seminar in Hawai so i wont be able to come to check it at your place.Since i am ok with the condition,i will be sending you a certified check that will cover the amount of the Item and the moving funds.You are to take your money for the item from the check after cleared in your bank within 2-3 days and have the rest sent to the mover via western union money transfer or money gram.For your inconvenience,i will add $50 with the payment to be your running around fee.I'm always a busy person and i will not like to miss this item.The information of the mover will be sent to you after the check is received and he will be at your location for the pick up with a signed note explaining that he will be assuming responsibility for the item on my behalf.

Kindly get back to me with the following information for issuing of
the payment........

NAME:
ADDRESS :
CITY:
ZIP CODE:
STATE:
PHONE NUMBER:

Thank you

Thursday, June 4, 2009

Fixing broken space completion on Emacs 22.x

Solution thanks to Karsten Lang:

Joseph Brenner writes:
> I see that space-bar completion on filename entry is essentially
> broken in gnu emacs 22, because they wanted to give you the
> capability to type spaces into a file name. I don't want that
> capability -- I'm glad that emacs can understand filenames with
> spaces, and sometimes I need to select them via dired, but I
> personally never create files named like this.

> So: what do I need to munge in order to get the old space-bar
> completion functionality back?

klang was good enough to email me his solution (which I'm passing on with his permission):
(if (boundp 'minibuffer-local-filename-completion-map)
(progn
(define-key minibuffer-local-filename-completion-map " "
'minibuffer-complete-word)
(define-key minibuffer-local-must-match-filename-map " "
'minibuffer-complete-word)
)
)

Saturday, April 18, 2009

James Nourse's Rubik's Cube Solution

I have a 2 year old nephew that likes to mess up my Rubik's cube. I have no desire to learn optimized solutions; I just need to remember the solution I learned waaaay back in 1981--the one by James G. Nourse. This blog post has a simplified version:


It is hard to find his solution online and I don't want to keep Googling it everytime!

Thursday, April 9, 2009

Shared Documents -- what is it?

Came across this post for how to remove that annoying "Shared Documents" folder. More importantly, it explains that the folder is just a folder: C:\Documents and Settings\All Users\Shared Documents. So this is a real folder--not a metaphor for changing the sharing status of files put in there--so if you delete files from there they are really gone!

Instructions for how to remove this folder can be found by searching for (in quotes) "Have you ever wondered what is the “Shared Documents” folder doing in My Computer?" on your favorite internet search engine.

Saturday, March 28, 2009

The Fast 50% diet

Here are the main features of the diet:
  • Eat whatever you normally do
  • Save time and money
  • No exercise necessary
  • Super simple--no thinking required!
So what is it? Well, there are 2 parts. The first part is the "50%" part:

Eat half of what you normally would.

This means that you have to estimate what you would normally eat and only eat half of that. So if you go to a place that has ridiculously large portions, you might eat only 1/4 of the meal, because normally you would eat half.

You save money because food goes twice as far. You save money because you can eat the other half as leftovers. You save time because it doesn't take long to eat half as much!

So can you eat chocolate all day? Sure. If you normally eat 20 pieces of chocolate for dessert, just eat 10. As long as you do exactly what you normally would but eat only half, you guarantee that you'll be taking in only 50% of your usual calories. That should be enough of a reduction to get anyone down into the weight-losing mode.

You might think that dieting like this would leave you feeling hungry all the time. Normally, that would probably be the case, and that is why you need part 2, the "Fast" part:

Fast once a month to reset your appetite.

Years ago I noticed that fasting had an unexpected effect: right after fasting I would feel full sooner than normal. You'd think you'd be famished after breaking a fast, but if you eat slowly you'll notice that you get that full feeling much sooner than normal. Respect that feeling and stop after 50%.

For me, about 24 hours taking in only water or juice works. The point of the fast is not to skip calories, but to reset your appetite. As a practical matter I find it easiest to fast on a day when I'm doing light chores or shopping--something that keeps me active but is not strenuous.

Historically, fasting is associated with spirituality. And I think it helps your body and mind to get back into balance. As someone who loves eat, fasting helps me to keep food in the proper perspective.

Sunday, March 22, 2009

Me vs. The Environment


Most decisions involve a tradeoff between two factors that are in opposition. Saving money vs. saving time. Inexpensiveness vs. quality. Doing some quickly vs. doing something correctly.

The solution always involves knowing how important one factor is compared to the other. This differs from person to person and changes over one's lifetime. For example, kids choose saving money over saving time, but adults will hire help when time is scarce and money is plentiful.

So why is this reasoning rarely applied to environmentalism? In most cases there is a tradeoff of time/money/pleasure for saving the environment. Saving water vs. clean hotel towels. Reducing carbon footprint vs. international vacations. Recycling vs. saving time.* The list is endless. These issues are rarely presented as tradeoffs. Why not?

Environmentalism shouldn't be dogma. It should explain the benefits and the costs of working to preserve the environment, so that each person can make an informed decision.

* Of course it is possible to do things more efficiently so that personal loss of time/money/pleasure in negligible. But after you've squeezed all the wasteful inefficiency out, you eventually have to face a choice between personal time/money/pleasure and further perserving environment.

Thursday, March 19, 2009

Upload local Thunderbird email to Gmail

I had almost 30,000 old emails in Thunderbird dating back to 1996. Now that I've been completely converted to The Way Of Gmail, I want all my mail there. I figured it would be a piece of cake seeing as how Thunderbird was the geek email client of choice and that mbox is a very standard mailbox format. Wow, was I wrong. Here's what I tried:

1. imapsync. Only does imap-to-imap transfers.

2. Ryan Grove's ruby script. Doesn't work for Thunderbird mailboxes. I asked, and the response was "This script can’t read Thunderbird mailboxes. It should be possible to write a script that can read them (I believe Thunderbird uses an Mbox-like format), but I don’t plan to do it." He launched "Larch" in the last couple of days which does imap-to-imap transfers; seems like that could be very useful oneday.

3. Scott Yang's python script. Works for maildir mailbox format, not Thunderbird. I asked, and the response was "I do not know whether it works with Thunderbird mailboxes, however I do not think it would be too hard coding a solution for it. Working on Windows might take a bit of effort. Basically it’s not tested :)"

4. Google Email Uploader. Only works with Google Apps Gmail accounts, i.e. not normal foo@gmail.com accounts.

5. Google Email Uploader + foo@bar.com + forwarding. I happen to own my own domain--let's call it bar.com and a Google Apps site for that domain. That means I can have people send mail to me at foo@bar.com and it goes to my Google Apps Gmail account. I only use the Google Apps account to forward my mail to my normal gmail account foo@gmail.com. So I simply used Google Email Uploaded to push the mail to foo@bar.com and from there it got forwarded to my normal gmail account. WRONG. Forwarding caused the dates to get set to the current day, not the original day.

6. Manual IMAP push. At this point I got a little discouraged and decided to do things manually: setup gmail to provide IMAP access, then drag and drop my emails up to gmail in Thunderbird. This turns out to work, but it is Painful if you have a lot of emails. The transfers often fail, so you have to do them in small groups. Even worse, there seems to be a rate limit on uploading so eventually gmail will lock you out of IMAP for a period of time!

7. Google Email Uploader + foo@bar.com + pop3. This actually worked. What I did was instead of using forwarding, I enabled pop access on foo@bar.com. Then in foo@gmail.com I added foo@bar.com to the "Get mail from other accounts". SUCCESS. A couple of points:

- I don't think you need to buy your own domain to use Google Apps which is necessary to use Google Email Uploader. If that is true, this is a no cost solution. If someone can verify this and post a comment it would be great.
- Some of my emails get munged together. I'm not sure who is at fault: Google Email Uploader, foo@bar.com or foo@gmail.com.


Tuesday, March 10, 2009

Transitioning from Perl to Python

I'm excited.  I'm taking a Python class tomorrow.  At the same time, I'm a little loathe to give be cheating on my long time girlfriend Perl.  Things will be different, but hopefully better in the long run.

One thing I'm hooked on is Perl's regular expressions.  Nick Craig-Wood explains that regular expressions in Python are more clunky but...
Having made the transition from perl to python a couple of years ago, I find myself using regexpes much less. In perl everything looks like it needs a regexp, but python has a much richer set of string methods, eg .startswith, .endswith, good subscripting and the nice "in" operator for strings.
So hopefully things will be ok.

Tuesday, March 3, 2009

Thinking in another language #2

Almost every language teacher will say that "translating" is the wrong way to go about learning a foreign language. By that I mean thinking "I eat ice cream" and then translating word by word into another language.
My personal experience says we always translate*. When you are first learning, you translate word by word. As you progress, you translate phrase by phrase, sentence by sentence, and eventually whole ideas at a time. And I find that the "chunk-size" of your translation varys depending on how familiar you are with the subject matter. If I read technical or formal documents in my target language, I find myself translating much more than if I'm gossiping about people--an area where I have lots of experience :-)
* Ok, maybe not kids, but that is another discussion.

Thinking in another language #1

What does it mean to "think in another language"?  Is it an accurate measure of fluency in a foreign language?  Here is Foreign Language Doctor's opinion, and I think it makes sense.

Saturday, February 28, 2009

Remodeling is an investment?

How do you interpret this clip from an article on remodeling?

On average a Kitchen Remodel will yield an ROI of 80-100%! This is an amazing rate of return on any investment, but the added bonus is that as a homeowner you get to enjoy the benefits of your Kitchen Remodel until you sell your home.


Ok, so if I spend $100k on my kitchen, the price of my house will go up $180k to $200k....right?  After all, the definition of ROI is profit divided by cost.  The first $100k would go to pay back what I spent, and the remaining $80k to $100k would be my profit.  Then I saw this tidbit in another article :

Homeowners can recoup an average of 83% for a vinyl siding replacement and 78% of their investment for a mid-range bathroom renovation

Wait a minute!  Recoup 83% means you didn't get back all the money you spent.  That means a negative profit and a negative ROI of 17%!

So why do they state--incorrectly--that the ROI is 83%?  Because it sounds better.  Because it makes people spend more money at Home Depot.  I'm not saying that people shouldn't remodel their homes, just realize that you're doing it primarily for your own enjoyment and not to make money!