Showing posts with label lenovo yoga. Show all posts
Showing posts with label lenovo yoga. Show all posts

Wednesday, January 8, 2014

How to check all of bestbuy's inventory to find which zip code has your desired product!

As an optimizer, I 'suffer' from a sometimes debilitating yearning for the best, or most efficient, product, solution, method, etc. Thus when the Yoga 2 Pro was released, I had to acquire one. However, BestBuy was/is the only distributor with the i7 8gb ram version (at a reasonable price and on-hand), and unfortunately they only had it available for in-store pickup at a select few locations.

Maybe this has happened to you. It's frustrating, is it not, that there's no way to find out WHERE the item is in stock!?

So I spent a few minutes throwing together an ad-hoc test/solution:
My solution requires:
1. Autohotkey
2. Chrome browser with Advanced page injector extension
3. Some ingenuity and ability to google how to do certain things (for example, how to use autohotkey's spy window to determine the coordinates you should have it automatically click)

Steps I took to get the Yoga 2 Pro:

1. Create a rule in advanced page injector options:
Match:
^http://www.bestbuy.com/site/ols*
Add JavaScript:
$(document).ready(function(){$('#frmStoresSearchFormId').attr('target','_blank'); if ($('span.ca-availablenow').length > 0){alert($("[name='TxtZipCode']").attr('value'))}else {window.close()}}) 
2. Open up the store locator from the item page on BestBuy.com and try a local zipcode.
 
3. Enter the following code into the Chrome console (open with f12 or ctrl+shift+i then click console), and press enter after you change the zips to include the ones you want (I found a list of all zips online and used SublimeText to add the comma and quotes):
$('#frmStoresSearchFormId').attr('target','_blank').attr('style','target-new: tab');
$('input.buttons-blue').attr('id','attack');
window.openBB = function(){console.log(window.curNum);console.log(window.zips[window.curNum]);$("[name='TxtZipCode']").attr('value',window.zips[window.curNum]); $('#frmStoresSearchFormId').submit(); document.getElementById('attack').click(); loadNewPage('storeSearch'); setTimeout(function(openBB){window.curNum = window.curNum + 1; window.focus; if (window.curNum < window.zips.length) {window.openBB()}}, 4000)}
window.curNum = 0

window.zips = ["00501","00544","00601"]
openBB() 
NOTE: The code redundantly attempts several methods for submitting the html form element - I didn't really bother with testing to determine which to use, so I just left them all in. This is messy and hack-y code but I got a Lenovo Yoga 2 Pro out of it :)
4. Run an autohotkey if necessary to restore form submission functionality (a Chrome bug prevents this from being consistent for most people)
My code is:
^!+b::
Loop {
Click 20, 27
Click 365, 483
Sleep 3000}
After installing autohotkey, run Window Spy to determine the location coordinates of your main item lookup tab and any of the form text boxes within it - then paste the above code in with your coordinates and save anywhere as a .ahk file. Then run it and the code will be summoned when you press ctrl+shift+alt+b

Note with the barebones code above your chrome window must be the active (in focus) window for Autohotkey to click in the right place.

This is a little bit less detailed than I would like but good luck & let me know if you find what you're looking for! I was able to convince the store manager to ship it to me if I emailed him a copy of my driver's license :)

Tuesday, May 7, 2013

I can't believe the Lenovo Yoga is still the best machine! How to fix the intermittent keyboard and mouse randomly stopping working bug

(for why the Yoga is the best, see my original post, here). Also be sure to pick up a stand dock to use/dock the yoga in portrait orientation!

The keyboard and mouse sometimes stop working on my Lenovo Yoga due to a bug with the ymc service + related device orientation sensor. The purpose of the service is to automatically disable the keyboard + mouse while the device is being used as a tablet so pressing keys/touchpad doesn't interfere with whatever you're doing.

However, for some reason these relatively important input devices seem to enjoy disabling themselves randomly during normal use.

Here's a 'hotfix':



1. create 2 files, ymcstop.bat & ymcstart.bat

2. open with text editor and type 'net stop ymc' and 'net start ymc', respectively (without quotes), then save
3. place a shortcut in C:\Users\Will\AppData\Roaming\Microsoft\Windows\Start Menu\Programs to each file (replace Will with your username)
4. right click and change the icon to something you like
5. press start and type 'ymc' - now right click on each (start and stop) and 'Pin to Start'

If the keyboard/mouse ever stop working, simply press the windows icon (or slide from the right) to get to the start screen and press the ymcstop you created. If you want to re-enable the service (which disables the keyboard for tablet use), simply do the same but click the ymcstart you created.

Hope this helps!

Friday, February 15, 2013

How to Wall-Mount Your Desktop for $0 and < 2 Hours

Last night I noticed not just one but TWO of my desktop's fans had stopped moving. This wasn't the first time Sully (the blue monster pictured (yellow is new)) needed some love, and I knew it wouldn't be the last. After about 3 years of occasional but recurring need for repair, I started growing tired of taking it apart and digging through its components to get to any particular problem zone (generally fans needing to be oiled).
At first, I started wondering if I needed a desktop at all. Perhaps I could hook my ultrabook up to all of my monitors and just use that?
Well, that was easy. A couple USB->HDMI adapters lying around & admittedly one splitter. Too easy. Back to Sully.

I was casually brainstorming more efficient ways to build a computer - both for better heat management and to prevent dust build-up. Perhaps I should just install it into an IKEA storage cube? 
Lucky for me, my girlfriend is a redditor, so she enlightened me about the possibility of wall-mounting a PC. Wow. Genius! This would mean the heat & exhaust could be positioned right next to the ventilation intake & near the ceiling, preventing my office from inevitably heating itself like a cauldron.

Proper preparation often diminishes both the fun and difficulty of a puzzle, so I typically MacGyver makeshift, ad-hoc solutions. 

I started by scrounging some supplies - most importantly, a mounting surface. Sharing a storage room in the basement with a restaurant and coffeeshop has its benefits- as I can often find very useful jetsam. 

 When I caught a glimpse of a spare metal storage shelf, I knew immediately the search was over - not only would it be strong enough to support a PC's weight, but it would have space for cable management and ventilation - not to mention a faster and more flexible mounting system. Zip ties!
 Another stroke of luck - mounting brackets leftover from deconstructing a wardrobe - meant I had everything needed to mount the shelf.

I dug around for supplies to mount the soon-to-be-external components. Zip ties, twist ties, and sticky felt pads seemed sufficient.

 I started with the mainboard and fan/heatsink. So far so good.
Next up: PSU and HDDs. Conveniently, my drives already had elastic attachment braces on them.

Last up- attach the wall mount brackets and drop it on!

 With no power button hooked up yet, I turned it on with a light tap of a screwdriver, and voila! -->


It's alive :)