Here’s the scenario. I wanted visitors to wellsb.com to see my new personal landing page written with Python and Google App Engine. That means, I had to relocate my blog from wellsb.com to blog.wellsb.com.
Obviously, I can’t redirect the entire domain, but I also didn’t want people who run into an old link on the web to hit a dead-end.
if self.request.path.startswith('/post/'): import urlparse to_server="blog.wellsb.com" scheme, netloc, path, query, fragment = urlparse.urlsplit(self.request.url) url = urlparse.urlunsplit([scheme,to_server, path, query, fragment]) self.redirect(url, permanent=True)This gives a 301 redirect to the appropriate blog post if somebody tries to access the old wellsb.com/post/* instead of the new blog.wellsb.com/post/*. Everything else remains unchanged.
So you’ve set up Ubuntu Touch on your Nexus 7, only to find out you don’t have that nifty side-stage feature. Fortunately, there’s an easy solution. Follow along:
SSH into your device per Ubuntu’s instructions. Tip: Use the following command to retrieve your local IP address: adb shell ifconfig wlan0
Now that you are connected to your device, it might be a good idea to make a backup of /usr/bin/ubuntu-session
Tip: The root password is phabletsudo cp /usr/bin/ubuntu-session /usr/bin/ubunt-session.bak
Now let’s make a simple modification
Scroll down to the line that reads elif [ “$device” == “grouper” ]; thensudo vi /usr/bin/ubuntu-session
Change both instances of GRID_UNIT_PX=14 to
Now restart the ubuntu-session serviceGRID_UNIT_PX=12
sudo service ubuntu-session restart
Also, the app running beneath the phone app is one I wrote up real quickly. A beautiful thing about Ubuntu is just how easy it is to develop for this OS, even with the SDK only in alpha. Networking, for example, is seamless— none of the async madness required with Android
Have Ubuntu Touch on your phone or tablet and want to know how to set the clock? Simple! Just SSH into your device per Ubuntu’s instructions. Tip: Use the following command to retrieve your local IP address:
adb shell ifconfig wlan0Now that you are connected to your device, simply execute the following command and follow the on-screen instructions:
Tip: The root password is phabletsudo dpkg-reconfigure tzdata
Sometimes we go camping to get away. Other times, we still want to be connected to the outside world. If you’ve spent any time camping in that second category, you realize how precious battery life can be. Fortunately, you can squeeze extra juice out of your electronic devices in all weather conditions with a couple purchases. For about $100, you can have a solar panel and a backup battery.
If you are serious about Android Development, you probably know about AndroidViews.net. If you are just getting started, I want to share this very helpful resource. AndroidViews helps you integrate beautiful widgets and form views in your application. Have you seen a nice design element that you’d like to use in your application? Don’t re-invent the wheel. You can probably find it on AndroidViews. Want a nice sliding ribbon menu like the Google+ App? There are options for that. In most cases, it’s as easy as adding the source as a library and including it in your project.
Android Views also has a helpful Libraries page where you can find other useful implementations, such as ActionBarSherlock. The Android Action Bar is a window element that was implemented in API level 11. Rather than check android versions and only implementing the action bar on post-Honeycomb devices, ActionBarSherlock allows you to maintain a consistent Action Bar across all versions of Android. Simply include the library and follow these usage instructions.
You must declare your activity to extend any of the activity classes that start with ‘Sherlock’ (e.g., SherlockActivity, SherlockFragmentActivity). Interaction with the action bar is handled by calling getSupportActionBar() (instead of getActionBar()).If you have questions about integrating these elements into your project, please leave a comment. These resources proved very valuable in my recent Android application.
Introducing Android Studio: an IDE designed to make you faster and more productive as an app developer.
#io13 #keynote #io13android
Officials in Mali say they'll send a new camel to the French president Francois Hollande after one he was given as thanks for sending troops to repel Islamist rebels, was killed and eaten by its supposed custodians. Mr Hollande was presented with the original camel in February during a visit to newly liberated desert town of Timbuktu.
So, imagine my dismay when I found this article (in Google Reader, no less) that says there will be no more Google Reader after more spring cleaning. I used GReader all day, every day. It sits in a pinned tab in my browser.
In light of this outrageous tragedy (albeit not unexpected), I now have to ask for your suggestions for an alternative RSS reader. One that syncs between desktop/web and mobile. Without all that crazy fluff (that ends up only showing me select articles, but since it shows them in a very pretty way, the developer thinks I will just let it slide). Something simple and functional. I can just add all my tech feeds, news feeds, etc to different folders. Browse the items, sorted by date. Read the ones that interest me. Mark the rest as read. And then rinse and repeat with new items next time I have a spare moment.
#SaveGoogleReader #GoogleReader #Reader
Since Google+ cover photos received a makeover, I decided to create a new one. Interestingly, I discovered a few bugs with how it handles animated gif timing.
For display on my profile, the frame delays I specify don't actually belong to the desired frame. They belong to the previous frame.
In addition, the preview ignores the timing for the last frame. If you click through on the image, you'll see that the actual gif timing is different from what you see in the preview.
I have chosen to optimize my .gifs for the preview at the expense of the full-size click-through. If these bugs are sorted out, I'll have to redeclare my timings.
Ever wondered how to set up a 301 redirect on your Google App Engine site? Don’t make the same mistake I did. It's actually very easy to redirect certain paths, while keeping others unchanged. If only I had realized this before my SEO took a tumble. Click through for details
#python #appengine #appenginetips