Tuesday, June 11, 2013

How do I debug/run an app in Android Studio to a Nexus 7

So, it turns out developer mode is a little tricky to find on a Google Nexus 7. Go to "Settings" -> "About Tablet" then click EXACTLY 7 TIMES on the "Build Number". (After three presses, you'll get a message "You are four steps from being a developer”) This will open up "Developer Options" in the menu. Choose that. Enable "USB debugging"

Thursday, May 16, 2013

Chrome - Network error - Failed

So, let's say you're downloading a large file in Chrome and it fails... what do you do?

Well, if you're at home or work or somewhere with a fast network, you probably just start the download again (there's no resume functionality).

But what if you're at a conference or coffee shop or somewhere without a fast internet connection.  Starting the download from the beginning could cost you a significant amount of time.
Instead:

Open your downloads folder (e.g. ~/Downloads in OSX if you haven't changed the defaults)
Locate the file you were trying to download, it will have the extension .crdownload
Rename the file, removing the ".crdownload" extension (e.g. myfoo.zip.crdownload should be renamed to  myfoo.zip)
Open a terminal window in the same directory
Use wget to resume the file (the -c flag will continue the download you're already started)
wget -c <url_of_the_file_you_were_downloading>

Thursday, January 17, 2013

getting py2cairo installed on osx w/ brew

(this is more of an gist that a post)
> ./waf configure

  ./options()
Setting top to                           : /Volumes/HDD/Downloads/py2cairo-1.10.0
Setting out to                           : /Volumes/HDD/Downloads/py2cairo-1.10.0/build_directory
  ./configure()
Checking for 'gcc' (c compiler)          : ok
Checking for program python              : /usr/bin/python
Checking for python version              : (2, 7, 1, 'final', 0)
Checking for library python2.7           : yes
Checking for program python2.7-config    : /usr/bin/python2.7-config
Checking for header Python.h             : yes
Checking for program pkg-config          : /usr/local/bin/pkg-config
Checking for 'cairo' >= 1.10.0           : not found
The configuration failed
(complete log in /Volumes/HDD/Downloads/py2cairo-1.10.0/build_directory/config.log)


 After a TON of trial and error, followed by brew install , here's what I came up with: 
 export PKG_CONFIG_PATH=/usr/X11/lib/pkgconfig:/usr/local/Cellar/libpng/1.5.13/lib/pkgconfig:/usr/local/Cellar/freetype/2.4.10/lib/pkgconfig:/usr/local/Cellar/fontconfig/2.10.1/lib/pkgconfig:/usr/local/Cellar/pixman/0.28.0/lib/pkgconfig:/usr/local/Cellar/cairo/1.12.8/lib/pkgconfig:/opt/local/lib/pkgconfig

> ./waf configure
> sudo ./waf install