Hacks


27
Jan 09

Times Open, Feb. 20

Awesome:

Announcing Times Open, a day-long event for developers interested in working with NYTimes.com as a news and information platform. When we started this Open blog, we also embarked on a mission to share more of what we do on the development side of The Times. So far, we’ve done that via conference presentations, open-source software, blog posts and (most recently and probably most importantly) our APIs. Times Open is the next logical step in our vision of NYTimes.com. We see our site as more than just a source of news and information: it’s a platform on which news and information become building blocks.

If only I had the time/money/bandwidth to get there – there are some awesome things to be built with the Gray Lady’s data.  Featuring my buddy Gabriel Dance.


22
Dec 08

Announcing Freedom v0.4

I’m pleased to release Freedom v0.4, a major update to the Freedom software.  This new version is a fresh rewrite, incorporating the ability to access local networks, an extended time period, and many significant bug fixes.  Particularly, Freedom’s authentication mechanism has changed (fixing the password-timeout bug) and Freedom will now appropriately handle suspends and sleeps.

Freedom v0.4 remains Mac only, and it is tested through OS 10.5.6.  This new version was paid for (thank you!) by those who have donated in the past.  I strongly recommend that all users upgrade as soon as possible.

Download Freedom directly (.dmg)

Freedom’s website.

If you run into any problems/have suggestions please leave them in the comments.  I do not plan on developing a Windows version, sorry.

Previous posts about Freedom:

Productive Unit Structures: Introducing Freedom
New Version of Freedom: v0.3
Freedom in the Telegraph


2
Dec 08

Hacking Google Scholar

If you connect to Google Scholar through a proxy (for example, through your library’s proxy), you’ll find that GS is unable to remember your preference settings.  Although Google seems to forget my preferences far too often, in the case of Google Scholar it isn’t their fault.  When you connect through a proxy you appear to Google as a different user every time, and until preferences are tied to your Google account (and not a session/cookie), Google is simply unable to remember them.

To “solve” this problem, I’ve found that you can set a bookmark that will set your preferences each time it is clicked.  While this doesn’t solve the problem of Google forgetting preferences between sessions, it will save you the time and effort of having to reset your preferences each time.  You will need to custom-craft your bookmark.  Here’s mine:

http://scholar.google.com/scholar_setprefs?num=50&scis=yes&scisf=4&submit=Save+Preferences

As you can see, in with I’m passing some options to “scholar_setprefs” – i.e. the mechanism that sets your Google Scholar preferences.  I’m manipulating two options, Number of Results (num=50) and Bibliography manager (scis=yes&scisf=4).  I could also directly manipulate the interface and search language, library links, and if the results opened new windows or not (I don’t because I’m happy with the GS defaults).

The options accept a range of values, which I’ll describe briefly:

Number of results (num), accepts:

  • 10
  • 20
  • 30
  • 50
  • 100

If you’d like 100 results to be displayed, you’d change the url so that num=100.

Bibliography manager (scis=yes&scisf=4).  Google Scholar supports a number of different export formats, and to change their default, you’ll need to change the scisf value.  Here are the corresponding values:

  • 4 (Bibtex)
  • 3 (EndNote)
  • 2 (RefMan)
  • 1 (RefWorks)
  • 5 (WenXianWang)

If you’re a RefWorks user, you’d change the string so that it looked like this scis=yes&scisf=1.

Putting it all together, if you’re a RefWorks user who wants 100 results displayed, you’d set your bookmark as follows:

http://scholar.google.com/scholar_setprefs?num=100&scis=yes&scisf=1&submit=Save+Preferences

Finally, if you’re accessing GS through your library proxy, you’ll need to add the proxy information into the URL. In the case of UNC we place the proxy information directly in the url. Therefore, my proxied bookmark looks like this:

http://scholar.google.com.libproxy.lib.unc.edu/scholar_setprefs?num=50&scis=yes&scisf=4&submit=Save+Preferences

As you can see, I’ve added .libproxy.lib.unc.edu to the beginning of the URL. This will vary by library, so you’ll want to look at other proxied URL’s at your institution to get a feel for where the proxy information goes.  As I noted above, there are a bunch of other options you can change directly. If you’d like to change those, simply view the source of the Google Scholar preferences page, look for the option and value pairs in the form, and tack them into the URL (making sure to add & before the option/value pair).


22
Nov 08

Fixing Google with Adblock Plus

TechCrunch is right – Google, It Wasn’t Broke.  Google has rolled personalization at the item level into search, cluttering their elegant interface.  As far as I can tell, this affects all users who are logged in with a Google account (i.e. Gmail, etc), and there’s no way to opt out.  Now, I’m not against personalization – if you want it.  And while it appears there’s no way to opt out, you can make the cluttering icons disappear with Adblock plus (Firefox users).  To make the buttons and conversation icon disappear, add the following “element hiding rules” to Adblock Plus:

google.com#BUTTON(class=wci)
google.com#BUTTON(class=w10)
google.com#BUTTON(class=w20)

Voila, Google back to normal.

Update: TechCrunch reports that Google may be rolling this feature back, and it reports on a Greasemonkey script that accomplishes the same results as this Adblock Plus filter.  I’m not a Greasemonkey user so I’m not able to verify.


9
Oct 08

Fixing the Yahoo News Toggle

Updated, thanks Dan!

Looks like Yahoo lets you toggle this off yourself, with a cookie. From Yahoo’s own help page: At the bottom of the page is an option to turn OFF expand/collapse. If you turn this off, you will not see the “Read Full Article” button anymore and will see only single, open pages.
http://help.yahoo.com/l/us/yahoo/news/expandpage.html

If you frequent Yahoo News, you’ve likely noticed the site has been redesigned.  Overall, the design is clean, information-rich, and provides a nice update to one of my favorite news sources.  Along with the redesign, Yahoo has introduced a bizarre, annoying functionality to news stories.  When a news story loads, you are delivered a truncated version of the story; to see the full story you are forced to click on the “Read Full Article” button that hovers midway in the page (generally next to an ad).  This has proven endlessly frustrating.

I figured this issue would be easy to fix.  Inspecting the code, the javascript controls are simple enough – the toggle is controlled by a simple onclick listener.  Disable the script and all should be well, right?  As it turns out, this is not as easy as it seems.  The script was inline – included in the page – meaning the only way to block it was to block all javascript in the page.  This makes Yahoo news fairly unusable.  After playing around with Adblock Plus, however, I discovered a formula that works:

news.yahoo.com#*(class=ult-section mod read-more-toggle)

This filter will prevent toggling, displaying the full page when it loads.  There are some side effects, the primary one being the story content loads last.  I was willing to trade this off to not have to click each time I wanted to read the rest of the story.  It appears that recently Firefox introduced functionality that enables just-in-time inspection and modification of pages.  Perhaps when Adblock Plus is updated there will be a more elegant solution to the inline javascript issue.


29
Sep 08

Reminder – Productivity Seminar this Friday

Just a reminder – this Friday we’ll be hosting a productivity seminar in 208 Manning Hall, from 10-11:30AM (Before CRADLE).  All students, faculty and friends are invited.

To find out more information or to propose a 10-minute talk, visit the website:  http://academicproductivity.pbwiki.com/ (password: SILS)

Sessions include:

  • 10:10 – 10:20 – Inbox Zero – Erin White
  • 10:20 – 10:30 – Your Computer’s Desktop is Not a To-Do List – Mike Brown
  • 10:30 – 10:40 – Literature alerts and push-button citations – Fred Stutzman

FULL INFO:

What: Open seminar (unconference style) on academic productivity–methods, tools, tips and tricks

Where: 208 Manning Hall, UNC-Chapel Hill

When: Friday 10/3 from 10 – 11:30am

Are you struggling with information overload, focus and concentration, or the quiet chaos of an unstructured, unscheduled “job” (despite all that ILS training)?  We feel your pain.  Join us to share your ideas
and learn from others.  We’ll discuss productivity methods and systems, tech tips, the latest tools… and just vent.


15
Sep 08

Hacking Unit Structures: Google Suggest and iTunes 8

Two tips that have made my life better in the past day:

I can’t stand Google suggest.  Even though I’ve set the preference to make it go away 1,000 times, it keeps returning.  I think something with Firefox and new tabs makes Google forget your preference.  To fix this permanently, set your Google bookmark as follows:

http://www.google.com/webhp?complete=0&hl=en

Every time you load Google in a new tab, you’ll reset the preference with your bookmark.  If you call up Google by actually typing in the URL – then you’re out of luck (unless, of course, you want to type the preceding URL).

Next, the new iTunes (8) has removed the preference setting that allows you to remove the pesky “link to iTunes store” arrows that appear next to songs.  To remove, follow Tech-recipe’s formula: open up a terminal and paste in the preference as follows:

defaults write com.apple.iTunes show-store-arrow-links -bool FALSE

Restart iTunes, and the links go away.