Pre-sell your “soon to be old” iphone to Gazelle or NextWorth

With the new iPhone to be announced within hours, you can sell your old ones to either Gazelle or NextWorth for cash. Even if you aren’t sure about selling it, at least get your order in to lock in the price since the offer price will start to go down as more and more people put in orders. Both were offering ~$200 for the 16GB 3Gs and ~$100 for the 8GB 3G phones at the time of this post on just the phone (you can get a couple extra bucks if you include the charger and ear buds). While it is probably not as much as I could make via craigslist or eBay, it’s still a good amount without having to deal with trying to sell it myself. I will probably be going with Gazelle (5% extra bonus code: TWEET610) since they are providing a FedEx label (and can even ship you a box to send the phone in too) rather than a USPS label, but I have used both service. I have sent both companies several computers, laptops and video games in the past year with only one problem where there was a disagreement on the condition specs of one of my laptops so I got like $10 less. (They offered to return the laptop to me if I disagreed with their assessment – I really couldn’t remember if the DVD drive was writable drive or not)

Update 7/17/2010: Received full amount from both services.

I sold both an iPhone 3G 8GB and iPhone 3Gs 16GB and received the quoted price for both, $111.10 and $296.50 respectively.

Counting Watts for Earth Day

For the past five months, I’ve been constantly monitoring our energy using in the house. While counting calories may be a dying fad, maybe counting watts can be the replacement. Unlike the rest of the going green to be cool trend that seems to be going around, my main purpose was to keep more money in my pocket. The general rule of thumb being a watt saved is a dollar saved per year.

I first started a couple years ago using P3′s Kill-A-Watt, but obviously that was limited to just one outlet and no way to log the data. Then came along the TED5000 from The Energy Detective which also integrated with Google PowerMeter. I got mine back in October and have more data than I know what to do with. I’ve been playing with it and trying to analyze and correlate the data and I’ll post some nice charts and plots of my findings in future posts. But for now, having the TED5000 has been quite useful. As an engineer, I’ve always wondered how my behavior would change if I had all the data possible. For example, I’m always taking different routes to work and recording the time (travel time and departure time) and fuel consumption to optimize my commute. And I believe some of the concerns with counting calories is the adverse behavior of possibly under eating. However, I really don’t see any pitfalls other than maybe never turning the air conditioner on.

After reading other users of the unit, my first goal was to bring down my baseline usage. Basically, I checked every device that is always plugged in to see if it’s worth the $1/W/yr to keep it plugged in. With 6 UPS units in the house and a HEPA air filter pretty much on all the time, I was only able to get it down to ~420 Watts. Prior to getting the unit, I had done some basic energy efficiency updates including checking for leaks around door and windows and replacing all 28 normal and 22 R40 bulbs. So my next step was playing with my programmable thermostat to see if there’s any way to even cut down one cycle per day, but with temperature not in the 100s yet, It will be a few months before any results. Now as to my day to day behavioral changes, I find my self actively turning off lights I’m not using, even if I plan to return to the room in a few minutes. With the TV, rather than muting it, when I receive a phone call, I turn it off if I expect it to be a long call or just turn off all the other components if I expect it to be short. I also find myself channel surfing a lot less – if there’s nothing on and the DVR queue is empty, the TV is off. With Google’s PowerMeter, it pre-budgets the electricity for my based on historical analytics (or maybe just a simple average). So for Earth Day 2010, I’m currently under budget for the day and look forward to keeping my watts down to a minimum.

PayPal Change Payment Reminder

I wrote this about a year ago and figured I’d also post it here.  If you are like me, and I think most are, the bank account linked to my PayPal account is more of a “hub” account where there’s hardly any money in it.  However, PayPal more often than not defaults to sending payments via the bank account.  I’m usually pretty good about making sure I switch it over to my credit card, but at least twice, I forgot.  I can’t remember if I was hit with a bounce fee or not, but I do remember on more than one occasion scrambling to move money over quickly to prevent the payment bouncing.

So this script will give you a reminder to change your payment method whenever you make a PayPal payment.  The script will change the background to Red and also provide a pop up notice.  You will first need to install the Greasemonkey Firefox plugin if you don’t have it already.  After restarting Firefox, you can either head over to the project page at Userscripts or click here to install. I’ve also included the source code below.

// ==UserScript==
// @name		paypal change payment reminder
// @namespace		http://userscripts.org/users/dchoe
// @description		to remind you to change your funding source to credit card. the background will turn red if your funding source is still set to instant transfer
// @source		http://userscripts.org/scripts/show/53710
// @version		0.1
// @include		https://www.paypal.com/*
// @include		https://payments.ebay.com/*
// ==/UserScript==
function changeStyle(css) {
	var head, style;
	head = document.getElementsByTagName('head')[0];
	if (!head) { return; }
	style = document.createElement('style');
	style.type = 'text/css';
	style.innerHTML = css;
	head.appendChild(style);
}
if (document.location.href.match(/paypal\./i)) {
	if (document.body.innerHTML.match(/instant transfer/i)) {
		if (document.body.innerHTML.match(/instantAch/)) { return; }
		else {
			changeStyle('Body {background-color: #CC0000}');
			alert('Change Payment Type');
		}
	}
}
if (document.location.href.match(/ebay\./i)) {
	if (document.body.innerHTML.match(/from bank account/i)) {
		changeStyle('Body {background-color: #CC0000}');
		alert('Change Payment Type');
	}
}

Asynchronous Analytics to Track Outbound Links

Now that Google has offered asynchronous tracking with Analytics, you can assign events and pageviews to any links on your page.  For me at least, the biggest benefit I saw was that I can now track outbound clicks.  Initially, I was just hard coding the onclick event, but once I’ve started to use WordPress more and more, this became unfeasible. So I’ve throw together a simple javascript to do it for me.

All you have to do is copy the code below and paste it anywhere before </head> (closure of your head tag). You will have to make two edits. First change the tracking code on line 3 to the one assigned by Google. Then change the domain name on line 4 to your domain. Be sure the include whatever sub-domain, if any, you are using (include www if you’re using it). The outbound link tracking will work for any links going to any other domain or sub-domain. In Analytics, these links will show up under Content as a page view. The page will show up as a hit in a directory named out – ie an outbound link to www.google.com will be tracked as a /out/www.google.com/ page view.

For WordPress users, if you don’t want to manually edit your theme or your theme doesn’t let you add anything to your <head> tags, install the Add to Header plugin.

<script type="text/javascript" charset="utf-8">
	onload = function(){
	var tracker = 'UA-XXXXXXXX-X'; // change this
	var domain = 'any.domain.tld'; // change this
	var code = "var _gaq = _gaq||[];_gaq.push(['_setAccount', '" + tracker + "'],['_setDomainName', '" + domain + "'],['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);})();";
	var newScript = document.createElement('script');
	newScript.type = 'text/javascript';
	newScript.innerHTML = code;
	document.body.insertBefore(newScript, document.body.firstChild);
	var allA = document.getElementsByTagName('a');
	var domainRegex = new RegExp ( "http:\/\/" + domain.replace(".","\\.") , "i");
	if ( typeof(allA) != "undefined") {
		for (i = 0; i < allA.length; i++) {
			var newAttr = null;
			var newAttrText = null;
			var oldAttr = null;
			var href = allA[i].href;
			if (!href.match(domainRegex)) {
				newAttrText = href.replace(/http:\/\//i,"");
				if (newAttrText.length > 0) {
					if (allA[i].getAttribute("onclick") != null) {
						oldAttr = allA[i].getAttribute("onclick") + ";";
					}
					newAttr = document.createAttribute("onclick");
					if (oldAttr == null) newAttr.nodeValue = "_gaq.push(['_trackPageview', 'out/" + newAttrText + "'])";
					else newAttr.nodeValue = oldAttr + "_gaq.push(['_trackPageview', 'out/" + newAttrText + "'])";
					allA[i].setAttributeNode(newAttr);
				}
			}
		}
	}
}
</script>

Note 1: For sites with higher traffic, you may want to save the code above (sans the first and last line) as a .js file to leverage browser caching. Then just copy and paste the following inside your head tag. Of course you will need to point the src to where you uploaded the file.

<script src="http://domain.tld/path/to/script.js" type="text/javascript" charset="utf-8">
</script>

Note 2: If you have previously used Google Analytics, be sure to remove all other instances of their tracking code.

I’m Back

So after about a 3 year absence, I’ve decided to start the blog back up.  I wish I still had my old posts, but I’ve moved hosting providers a few times since then and of course there’s no backup. Now, I’ve got my own server for various projects I’m working on so no more switching hosts every year.

This time around, I’ve decided to also have a photo blog rather than a normal photo gallery.  So my photos will be on my other site – http://dustinchoe.com and everything else here.