iPhone Calendar Won't Alert

My iPhone calendar stopped sounding alerts for appointments. This happened after I switched from syncing the calendar via an Exchange account to syncing via the “Gmail” account. (This really means that I was synching to Google via the Exchange protocol and now I’m syncing via the CalDAV protocol.) I made the change because I have two calendars with Google and I wanted to sync with them both. Exchange will only sync to the default/primary calendar.

So I switched to the GMail/CalDAV protocol for syncing my calendar. (I retained Exchange to sync my Contacts, because CalDAV does not sync contacts.) And my iPhone got real quiet.

When I enabled CalDAV sync, I selected sync for two of my Google calendars (via the “Calendars” button in the Calendar app). I did not select the “All GMail” option - I just selected the individual calendars I wanted. Note that the alarms I wanted were indeed in the synced calendars, but the reminders just don’t happen unless “All GMail” is selected.

Can't Sync Multiple Google Calendars With iPhone

I have multiple calendars with Google Calendar. There’s doc that tells how to choose which of these calendars synchs with your iPhone via https://www.google.com/calendar/iphoneselect. But it didn’t work! After going to the web page and selecting multiple calendars, my iPhone saw only a single calendar – the original calendar.

It turns out that I had set up my iPhone to synch via Exchange protocol. Exchange supports only a single calendar. I had to tell it to synch via Gmail protocol (which is really CalDav).

But… GMail/CalDav won’t synch Contacts. So I have an Exchange account and a Gmail account set up for sync, and Contacts uses Exchange and Calendar uses Gmail.

I’ll have to be really careful not to accidentally enable Calendar sync via both methods. No telling what damage that would do.

Static DHCP on Merlin ASUS Routers

The following is mostly supposition. (I’ll remove this remark after I finish testing.)

When I set up static DHCP on my Asus router, it doesn’t sort the entries by IP address. I’d like that to happen. Here are some related notes.

  • DHCP is controlled by /tmp/etc/ethers. It has MAC and IP addresses in it.
  • DNS is controlled by /tmp/etc/hosts.dnsmasq. It has IP address and DNS name entries.
  • I think that both of them are derived at boot time from the nvram variable dhcp_staticlist.
  • “nvram get dhcp_staticlist > temp-file” will show (in a non-standard format) all of the info needed to create ethers and hosts.dnsmasq files.
  • ‘nvram set dhcp_staticlist “long-string-from-temp-file”’
    • You can use backslash as a line continuation character, to permit newlines in long-string-from-temp-file.

Other notes:

  • “nvram show” lists all nvram.
  • must use a “nvram commit” after any nvram set (and, eventually, reboot in order to load them).
  • see http://forums.smallnetbuilder.com/archive/index.php?t-12876.html
  • see https://github.com/RMerl/asuswrt-merlin/wiki/Custom-config-files

See also: Merlin’s DHCP terminology for static, dynamic, and manual

Excel - I Need a Bunch of Slope Charts Comparing Different Columns

From time to time, I get a worksheet full of data. There’s one column with a measurement. There are several other columns with different attributes. I want to find out whether any of these other attributes correlate with the measurement.

Here’s an example:

Score Name Shoe Size Age
12 Jim 6 33
15 Jim 8 14
33 Joe 7 6
2 Fred 6 5

We might want to answer the questions:

  • Is there a relationship between Score and Age?
  • Is there a relationship between Score and Name? (Maybe people who are named Jim do better that people who are named Joe.)
  • Is there a relationship between Score and Shoe Size?

I call these “slope charts” because you’ll typically have a lot of rows, you’ll sort the rows from small to large (or vice versa), and you’ll create a column chart that has a slope from one side to the other.

This is a job for Pivot Tables! I’ll tell you how to do one column (Name), and you’ll easily figure out how to do other columns.

  1. Select the Score column.
  2. Add the Name column to the selection (via Control-click on the column header).
  3. Click Insert (on the menu), Recommended Pivot Table, and insert a pivot table to a new worksheet.
  4. Change the Pivot Table settings (for Values) from Sum to Average (or not, if you really want to use Sum).
  5. Sort the table by the Average column (by way of the drop-down in the Row Labels column – use More Sort Options).
  6. Select the entire table.
  7. Insert a clustered column chart.
  8. Give your worksheet a good name, because you’ll probably be adding more tables/charts.

Make Visio 2013 Stop Putting Arrowheads On Connector Lines

Visio 2013 wants to make every connector line be an arrow. I want plain lines. You can’t do this globally, but you can do it on a document-by-document basis. Here’s how to expedite it.

One time: Add a Quick Access Toolbar icon to make it easier to do every time you create a document.

  • Files » Options » Quick Access Toolbar » All Commands » Define Styles

Then, each time you create a new document, click on the icon you just added, and tell Visio that you want no arrowhead on each end of your connector lines.

Search Microsoft Access Queries for Text

Save the following in a Module; then run it from the VBA immediate window.

' Arguments:
'    1 - Text to search
'    2 - Show the SQL (true) or just the Query name (false)
'    3 - Wildcard for names of queries to search.
' Example Use:
'    SearchQueries "findThisText"
'    SearchQueries "findThisText", true
'    SearchQueries "findThisText", true, "InQueriesNamedBeginningWithThis*"
Sub SearchQueries(SearchText As String, Optional ShowSQL As Boolean = False, Optional QryName As String = "*")
    On Error Resume Next
    Dim QDef As QueryDef

    For Each QDef In CurrentDb.QueryDefs
        If QDef.Name Like QryName Then
            If InStr(UCase(QDef.SQL), UCase(SearchText)) > 0 Then
                Debug.Print QDef.Name
                If ShowSQL Then Debug.Print QDef.SQL & vbCrLf
            End If
        End If
    Next QDef
End Sub

Selling On eBay Is No Picnic

I’ve sold a few items on eBay. Most went well. Selling my MacBook has been a nightmare.

  • On the first auction, it was won by an international bidder, even though I stated that I only ship to US addresses. (I don’t want to deal with customs.)
  • On the second auction, it was won by a sham buyer with zero feedback. These people sign up for a new account, bid up the price, and have no intention of completing the transaction. They discard the new account after driving up the price. Maybe they do it for fun; maybe they do it to drive up the price of a similar item they are selling.

So I’ve compiled some best practices and other notes. These apply to low-volume sellers who sell an occasional expensive item.

  • Set your seller preferences by:
    • Click on My eBay » Summary
    • Click on the Account tab
    • Click on Site Preferences
    • You may have to click “Show All” to expand all the sections.
  • Under Payments From Buyers, pay attention to these settings:
    • ENABLE: Use checkout
    • ENABLE: Offer PayPal on my listings
    • ENABLE: Display “PayPal Preferred” on my listings (I’ll explain why in a minute.)
    • DISABLE: Offer the Global Shipping Program
  • Scroll down to Shipping Preferences and click Edit next to “Exclude shipping locations from your listings”
    • Exclude them all. (It will still sell to the continental 48.)
  • Scroll down to “Buyer Requirements” and click Edit
    • BLOCK: Buyers without a PayPal account (This is why you enabled ‘Paypall Preferred.’ This cuts down on sham buyers. They usually don’t set up sham PayPal accounts.)
    • BLOCK: Buyers with Unpaid Item strikes. (If they didn’t pay someone before, they might not pay you.)
    • BLOCK: Buyers in locations to which I don’t ship
    • BLOCK: Buyers with policy violation reports
    • BLOCK: Buyers with a negative feedback score
    • SET: Apply above settings to active and future listings
    • SET: Don’t allow blocked buyers to contact me

By blocking international sales and blocking non-Paypal bidders, you might lose an occasional bidder, but you cut way down on scams and hassle.

When you post your listing:

  • Be sure to state that you do NOT ship internationally and you will cancel international bids.
  • Be sure to state that you will not sell to buyers with zero feedback who signed up after your auction started. (You can’t cancel bids, and you will sell to them if they pay. This is just bluster.)
  • Be sure to SPECIFY your shipping price/terms. It will default to something that won’t cover your costs!
  • Be sure you will be available in 5 or 7 days in the hour or two prior to the end of the auction. You’ll get a bunch of questions at the last minute. Answering them may help your sale price.
  • Put in a low starting price and hope for the best. You want to get bidding started early, so many people will be watching.
  • If you are selling a fixed-price item, be VERY careful not to accidentally enable “or best offer”. This happened to me by accident.

When the item sells:

  • Use eBay’s feature to send an invoice. Check the shipping price/terms on the invoice before sending.

If the buyer does not complete payment:

  • Wait 4 days.
  • Block the buyer (by user ID) from future sales.
  • Go to My eBay » Selling
  • Scroll as needed to locate your item (if you have more than one item for sale)
  • Press the “More Actions” drop-down and select “Resolve a Problem”
  • Choose “I sold an item and haven’t received my payment yet.”
  • It will show you “Review case details and submit” and you want to submit it.
  • It will offer the unpaid item assistant. Walk through the wizard.
    • Set it for 4 day time-out
    • Enable all email notifications
    • Do NOT “Automatically relist the item when case is closed”
  • On your Sold items page, you’ll see “eBay note: An unpaid item case is open for this transaction.”
  • Wait 4 days
  • Click » My eBay » Selling » Go To Resolution Center
    • Scroll down to locate your unpaid item. Status will be “Unpaid item case open – awaiting payment. You can close this case now”
      • (If it still says, “Unpaid item case open – awaiting payment”, you have to wait until 4 days of 24 hours have passed.)
    • Click the drop-down arrow underneath “Take Action”
    • Choose “Receive fee credit”
  • (I’ll come back and update this list after I make further progress…)

=====

Update: 2015.12.03

There’s a message on MyEbay saying: You can sell up to 100 items or up to $5,000.00 per month, whichever comes first.

I sold some low-priced items with buy-it-now. I listed them as buy-it-now.

  • Suddenly, PayPal is telling me I can’t have my money unless I upgrade to a Premier or Business account. They have my money, and they aren’t giving it to me. I wish I’d been told this in advance. I upgraded to Premier. Then they told me they’d be taking 3% of all transfers to me, making it look like I’d lost the ability to get funds from family/friends at no cost. I had my wife send me $1 to check, and I did NOT get surcharged, so I see no down-side to Premier yet.
  • Note: Despite listing the item as Paypal-only, the buyer used a credit card via Paypal. You can’t block this, and it was the buyer’s use of a credit card that drove Paypal to demand that I upgrade. If you don’t want to run into the credit-card problem, you cannot accept Paypal - you must demand some other method of payment, and nobody is going to buy your product. I hate Paypal.
  • Selling low-priced items with buy-it-now had no eBay fee. Since they went into a bubble-padded envelope under 2 ounces, the total cost was about 50 cents for the envelope, plus $2.04 for shipping. I tried to print my mailing label and purchase postage via eBay and the page never returned. Google searching says this is a common problem. I was able to buy postage and print the shipping label via Paypal using Safari but not with Chrome. It went well, and I got a few cents discount on the postage. (The $2.04 cost included the discount.) Since the postage is pre-printed, the 13 oz limit, at which you have to present the mailing to a postal service clerk in person would not have applied.
  • As an example:
    • Listed 2 small items at $12.89 buy-it-now (shipping included)
    • Accidentally included “or best offer” feature
    • Offered $8 per item
    • Counter-offered $10 per item and sold at that
    • Bought 25 4x8 padded envelopes for $4 (cheap per piece, but I didn’t need 25)
    • Shipping at $2.04
    • Cost of printing a page (the shipping label + postage)
    • Cost of clear packing tape to “laminate” the 3.5x6 label to the envelope
    • eBay fee = $0
    • PayPal fee = $0.88 (30 cents + 2.9%)
    • Paypal mailing label dimensions = 4”x6.25”. Fits (barely) on a 5x8 padded envelope.
    • Sold 2 more items at about $10 each, for a total of about $40 for all 4 items sold.
    • Billed 6.88 in January by eBay.
    • It looks to me like about $5-6 per item in selling/shipping cost for an item that ships in a small padded envelope.

Using Fiddler to Capture Encrypted Traffic (HTTPS)

Fiddler is a useful tool when debugging applications that use HTTP/HTTPS. It can be particularly helpful when you need to show whether a problem lies with the client or with the server. Server support people tend to be confident that the problem is on the client; client support is certain the problem lies on the server; sometimes they get together and agree to blame the network.

You can use Fiddler to help show whose problem it is. Then you can beat up on the right party, to get them to fix the issue.

This is a tutorial on how to use Fiddler to capture HTTPS traffic. You should follow along and do these steps on your own Windows PC.

The Short Form

Here’s an overview of some of the things we will be doing:

  • Install Fiddler
  • Ensure that we can do HTTP capture
  • Enable HTTPS capture
  • Accept the Fiddler certificate
  • Capture HTTPS!

Install Fiddler

  • Visit http://www.telerik.com/download/fiddler
  • There are two versions of Fiddler: Fiddler 2 and Fiddler 4 (as of December 2014). Try Fiddler 4 first.
    • Most of the time, it doesn’t make any difference which version you use. Fiddler 2 requires that you have Microsoft .Net version 2 installed on your PC. Fiddler 4 requires that you have Microsoft .Net version 4 installed on your PC. You probably have both. You can start by installing Fiddler 4. If it fails, then you can either try Fiddler 2, or just install Microsoft .Net version 4.
    • This tutorial will refer to “Fiddler”. You may see “Fiddler 2” or “Fiddler 4” or “Fiddler” on your PC. Treat them as synonyms.
  • Download it. Run the install.
  • Ensure that Fiddler starts properly. Go to Start » All Programs, and click on Fiddler to start it.

Learn How to Capture HTTP First

Yes, I know you’re anxious to capture HTTPS. We need to walk before we run. (If you are an old pro at capturing HTTP with Fiddler, you can skip this step.)

For purposes of this tutorial, you should close other application and other browser tabs you are not currently using. If those applications use HTTP/HTTPS while you are running the tutorial, you will capture their output in Fiddler. This is OK, but it might confuse you because your output will be different than the tutorial.

  1. Start Fiddler (Start » All Programs » Fiddler) if it is not running.

That’s it. There is no step 2. When Fiddler is running, it is capturing HTTP – unless you tell it not to. Let’s prove it.

What can we tell from this?

  • Row 1:
    • Fiddler used HTTP to check with its web site, to see if there is a newer edition. (We’re guessing that, based on the URL column.)
    • Result = 200. This means the web server sent HTTP status code 200, which is how web servers say, “OK. Did it. Success.”
    • The process column tells you that “fiddler” is the name of the process that caused this request/response.
  • Row 2:
    • Per the Process column, Internet Explorer made the request.
    • Per the Host and URL columns, IE fetched www.google.com/about/.
    • Per the Protocol column, it used HTTP (i.e. http://www.google.com/about).
    • Per the Result column, the server says it successfully responded.
    • Per the Body column, the server sent 5021 bytes.
  • Other rows:
    • What’s all this other stuff? We asked for a simple web page, and we got lots of other transactions??!!
    • This is normal. The web page that Google sent when you asked for the about page contains references to these other URLs, so IE went ahead and fetched them.

Let’s look at the ‘about’ transaction in more detail.

  • Click on transaction #2 (www.google.com/about) on the left side of the window.
  • Click on the Statistics tab on the right side of the window.
  • See below Fiddler Screen Capture 2

The numbers in your screen will be different. See if you can apply what I’m telling you about my screen shot with what you see on your Statistics tab.

  • Bytes Sent: 1077 - The request from the browser was 1077 bytes of HTTP headers.
  • Bytes Received: 5462 - The server replied to the request with 441 bytes of header and 5021 bytes of web page.
  • ClientConnected: The browser made a TCP/IP connection to the server at 11:47:49.
  • ClientBeginRequest: The client started sending its request at 11:47:49. This is immediately after making the connection. Sometimes you’ll see a ClientConnect that is much older than ClientBeginRequest. When this happens, the browser is re-using an existing connection.
    • In the old days, every request/response cycle looked like: Connect, Send-request, Receive-response, Drop-connection.
    • Then somebody got clever and said, “I can save some time by sending multiple request/response pairs to the same server on a single connection.” A connection will be established and left open until a time-out occurs, and a smart browser will re-use connections instead of creating a new one for each request.
  • ServerConnected: Ah. I should mention that Fiddler is a proxy server. Your browser connects to Fiddler, and Fiddler relays the requests to the server (or to an upstream proxy server). In this case, Fiddler connected to the upstream proxy server a split second after the browser’s request.
  • ServerGotRequest: This is when Fiddler thinks the server received the request.
  • ServerBeginResponse: This is when the first byte of the server’s response was received.
  • ServerDoneResponse: This is when the last byte of the server’s response was received.
  • Overall Elapsed: This is how long the request/response cycle took. In the screen shot above, you’ll see that the whole transaction took about 1/4 of a second. Very fast. But this is only how long the ‘about’ page itself took. Remember that the page references other pages, and those pages also have to be fetched. They aren’t included in the 1/4 second.

Check the Timeline

  • Select transactions 2-11 on the right side of the window. (Click on #2 and then shift-click on #11.)
  • Click on the Timeline tab on the right side of the window.

You’ll see something much like the screen shot below. Fiddler Screen Capture 3

In the Transfer Timeline, you can see that the complete transaction took almost 2 seconds. The ‘about’ page took 1/4 second. It contained a reference to a google.js page, which looks like it took about another 1/4 second. It also referenced a default.css page, which took a little longer. Notice that the google.js and default.css downloaded in parallel. Neither one could start until the ‘about’ page finished loading, because that page referred to them, but once the ‘about’ page was loaded, the browser could see that it needed to download both of them, so it did so in parallel.

  • Assignment: One of google.js/default.css reused the connection which was created to download the ‘about’ page. In order to operate in parallel, the other one had to open a new connection. Use the Statistics tab to see which of google.js/default.css re-used the old connection and which created a new connection.
  • Hint: The ClientConnected value for the one that re-used a connection will match the ClientConnected value for ‘about’.

Looking at the full Transfer Timeline, you’ll notice that several transactions start at about the same time, while others look like one doesn’t start until the one before it completes. There are two things that can cause this:

  • If one page refers to another, the second page won’t start downloading until the page that references it is downloaded. (Usually.)
  • If the browser limits the number of concurrent connections (for example it may have a rule that says, “No more than 4 concurrent connections to the same server”) later transactions will have to wait for one of the earlier transactions to finish, in order to re-use one of the connections.
    • Note: Most browsers permit configuration of the maximum connection count. Sometimes you can improve page load time by increasing the maximum. Sometimes you can crater the server, if you have 50 users all trying to hit the same server with a 20 connection limit, you could have 1000 connections all hit the server at the same time. This will hurt the server’s performance.

Looking Deeper

Let’s look at the ‘about’ page in more detail.

  • Click on transaction 2 in the left side of the window.
  • Click on the Inspectors tab on the right side of the window.

You’ll see something a lot like this: Fiddler Screen Capture 4

The first thing you want to do is click where it says, “Response is encoded and may require decoding before inspection. Click here to transform.” Go ahead and do it. I’ll wait…

OK. On the right side of the page, you’ll see two panels: Request Headers and Response Headers.

When the browser sends a URL, it also sends some ‘headers’. These are cleverly placed in the Request Headers” panel of Fiddler. When the server sends back a response, in addition to the web page itself, it also send back some headers. These are cleverly shown in the *Response Headers panel.

Looking at the Request Headers in the screen shot above (or in your own window, as you play along at home) you can see:

  • The browser sent an HTTP GET request for /about/ and it told the server it would like to use HTTP version 1.1 (which supports connection re-use).
  • Cache: The browser has a cache for this page, and the server should only send the page if it has changed since the prior copy was cached.
  • Client: This tells the server about the browser.
    • Our browser is prepared to accept certain types of content (JPEG images, applications, GIF images, etc.).
    • Our browser tells the server it can handle gzipped pages. If the server gzips pages before sending them, they’ll move across the network faster, and the browser will unzip them before displaying them.
    • The user likes US English. (Some servers are multi-lingual.)
    • User-Agent: Despite the fact that it looks like it is telling the server that the browser is “Mozilla 4.0”, this really tells the server that I was using IE 8.0. This is just how browser identification works. It always starts by saying “Mozilla” and then the real browser info is provided in parenthesis.)
    • Cookies: These are the cookies sent from the PC to the server.
  • Transport: The interesting thing in this case is “Proxy-Connection: Keep-Alive”. This says that the browser would like to maintain a connection through the various proxies, all the way to the server. In other words, it is planning on re-using connections to send/receive multiple requests.

I’m not going to go into details on the Response Headers.

  • Assignment: You explore the Response Headers. Use Google to find out what they are telling you. (Be sure to include “http response header” in your Google query.) Oh… There is a “Header Definitions” link in the Response Headers panel. You should be able to click on it to see the Fiddler site’s definition of the headers, but as of December 16, 2014, that page is broken and there’s nothing on the page!

Show Me the Response Body

  • Click on the TextView tab on the right side of the window.

The lower panel will now show the full content of the web page as sent by the server.

I’m not going to go into detail on the web page. It is a web page with HTML, JavaScript, and references to other pages that have to be downloaded in order to render the page.

Stopping/Starting Capture

While you’re exploring a session, it can be annoying if Fiddler keeps capturing more transactions, causing the left panel to scroll.

  • On the File menu, the first entry is “Capture Traffic”. When there is a check mark in front of “Capture Traffic”, Fiddler is capturing. Click on “Capture Traffic” to toggle capture on/off.

Where Are We? System Proxy and Other Tips

At this point, we can capture a basic HTTP session, we can explore the request and the response, and we can stop and start capture. It doesn’t matter whether the HTTP session comes from Internet Explorer, Firefox, or Java – so long as the browser or Java is configured to use the Windows-configured system proxy server.

  • For Internet Explorer, it just works. Don’t mess with it.
  • For Firefox, BEFORE you start Fiddler, look under Tools (menu) » Options » Network » Settings and be sure that “Use System Proxy Settings” is selected.
  • For Java, BEFORE you start Fiddler, go to Control Panel » Java » General » Network Settings and select “Use browser settings”.

Don’t change proxy settings while Fiddler is running. Fiddler is a proxy server. When you start Fiddler, it will change your proxy settings to point to Fiddler for your proxy. If you had a proxy server set up before you started Fiddler, Fiddler will chain to that proxy server as the next step on the way to the web server.

Fiddler is just an HTTP/HTTPS proxy server that logs everything that passes through it.

Tip: Sometimes you want to clear stuff from the Fiddler capture log. Maybe you solved one problem and you want a fresh start for another problem. You could exit and restart Fiddler to clear the capture log. You could go to Edit (menu) » Remove » All Sessions. What I usually do is click on any transaction, press Control-A to select all transactions, and then press the Delete key on the keyboard.

Tip: Save your Fiddler log! If you quit Fiddler without saving, your log will be discarded. To save, go to File (menu) » Save » All Sessions.

Tip: Never, ever email a Fiddler log. Some email systems have an anti-virus plugin that will remove executable code from attachments. If any of your web pages have JavaScript in them (and most pages do have JavaScript), the anti-virus will rip it out of your Fiddler log, corrupting the log beyond redemption. Use a shared network folder, file upload service, USB flash drive, or instant messaging to transfer Fiddler files.

Configuring for HTTPS Capture

Sometimes you need to look inside HTTPS. HTTPS traffic is encrypted to prevent this from happening. We’re going to fool the browser (or Java) into thinking that Fiddler is the server. The browser will send encrypted data to Fiddler, Fiddler will decrypt it, log it, re-encrypt it, and send it to the server. The server will send encrypted data to Fiddler, Fiddler will decrypt it, log it, re-encrypt it, and send it to the browser (or Java).

In security circles, this is known as a “man in the middle attack.” Browsers and Java don’t like this. We’ll have to tell them to trust us. We’ll also have to tell Fiddler it is OK to do this.

Enabling Fiddler Decryption: Go to Tools (menu) » Fiddler Options » HTTPS. Enable both “Capture HTTPS CONNECTS” and “Decrypt HTTPS traffic”. If you want to decrypt solely browser traffic, choose “… from browsers only.” If you want to decrypt all processes, choose “… from all processes.” Java alert – Java might run inside the browser window, so if you need to capture Java, you’ll want “… from all processes.”

Honestly, I haven’t had a lot of success with “… from browsers only.” When you are running Fiddler, I recommend that you CLOSE ALL APPS besides the one you are testing, and use “… from all processes.”

The first time you do this, Fiddler will ask you: Fiddler Warning 1

Yes, you do want to trust Fiddler.

Because this is security, you’ll get asked again: Fiddler Warning 2

Yes, you do want to install the certificate. This is how Fiddler pulls off decryption. You have to tell the browser to trust Fiddler.

Let’s see it work. After you enable decryption (and, if you turned off capture, turn it back on), point you browser to https://www.google.com. Here’s what that looks like in Fiddler: Fiddler Screen Capture 5

Let’s look at that is some detail. (Reminder: You should do this tutorial, not just read it. Look at your Fiddler results, in addition to mine.)

  • #1 - The browser connected to port 443 at Google, to set up an encrypted connection. This should make everything that goes inside the tunnel private and un-readable by anyone except Google. Result = 200 indicates that it succeeded.
  • #2 - The browser then sent a request for the page named “/” at www.google.com, via that tunnel. Result = 200 indicates that the server sent back a page successfully.
  • #3 - The browser then opened another encrypted connection. This one went to clients1.google.com. (The “/” page probably has a reference to https://clients1.google.com.) Result = 200 indicates that it succeeded.
  • #4 - The browser sent another request to www.google.com. This one was for the page named “/gen_204?v=3&s=webhp…”. Result code 204 indicates a special kind of success. It says that the server successfully handled the request, and the server sent back some headers, but there will be no page content. This URL was probably a tracking URL. It told Google something about you or about your PC, but the Google search page that will be shown in your browser was not altered in response to this URL.
  • #5 - The browser sent a request to clients1.google.com (over the second tunnel). As with #4, Google sent back a success indicator and headers, but no page body.

But Did We Decrypt?

  • In the left side of the window, click on the transaction for https://www.google.com/ (in my screen shot, it is #2).
  • In the right side of the window, click on TextView. (If it tells you that you need to ‘click here to decode’, do so.)

If you decrypted successfully, you’ll see the web page for www.google.com/ in the lower panel. See example below:

Fiddler Screen Capture 6

Java and HTTPS

I’m assuming that you have a Java applet that runs inside your browser. Stand-along Java apps are not included in this tutorial. Depending on how your applet is written, you may need to tell Java to trust the Fiddler certificate. Here’s how to tell Java:

  • Start Fiddler
    • Go to: Tools (menu) » Fiddler Options » HTTPS » Export Root Certificate to Desktop
  • Go to: Windows Start Menu » CPanel » Java » Security » Manage Certificates » Import
    • Import from FiddlerRoot.cer from your Desktop folder.
    • Close/OK to get rid of the windows you passed through.

Run a Macro in Another Excel Workbook

I sometimes need to run an Excel macro from another spreadsheet. The standard solution is:

Application.Run (workbookName & "!" & macroName))

Sometimes this works. Sometimes it fails with

  • Run-time error ‘1004’:
  • Application-defined or object-defined error.

Solution:

Wrap the workbook name and the macroName in apostrophes.

Application.Run (ApostropheMe(wbTarget.Name) & "!" & ApostropheMe(MacroName))

You’ll find doc that says you need to do this for file names with spaces. I found it happens with some other characters too.

Useful code:

Sub ColorAllCharts()
	RunMacro "MyOtherWorkbook.xlsm", "MyBigMacro", "C:\MyFolderOfSpreadsheets"
End Sub

Private Sub RunMacro(ByVal WorkbookName As String, ByVal MacroName As String, ByVal FolderName)
	Dim wbTarget As Workbook
	Dim CloseIt As Boolean
	 
	CloseIt = False
		
		
	On Error Resume Next
	' See if the Workbook is already open...
	Set wbTarget = Workbooks(WorkbookName)
	 
	If Err.Number <> 0 Then
		 'If the workbook wasn't already open, open it
		Err.Clear
		Set wbTarget = Workbooks.Open(FolderName & "\" & WorkbookName)
		CloseIt = True
	End If
	 
	 'Did the open succeed?
	If Err.Number = 1004 Then
		MsgBox "Unable to open:" & FolderName & "\" & WorkbookName
		Exit Sub
	End If
	If Err.Number <> 0 Then
		MsgBox "Surprise error " & CStr(Err.Number) & ":" & FolderName & "\" & WorkbookName
		Exit Sub
	End If
	On Error GoTo 0
	 
	 ' Run the macro
	 ' If you don't use apostrophes, some file names will fail with Error 1004 (and not only those with spaces in them).
	Application.Run (ApostropheMe(wbTarget.Name) & "!" & ApostropheMe(MacroName))
	 
	If CloseIt = True Then
		 'If the target workbook was opened by the macro, close it
		wbTarget.Close savechanges:=False
	Else
		 'If the target workbook was already open, reactivate this workbook
		ThisWorkbook.Activate
	End If
	 
End Sub

Private Function ApostropheMe(ByVal s As String) As String
	ApostropheMe = "'" & s & "'"
End Function