tweaksource

What does a bill like PIPA/SOPA mean to our shareable world? At the TED offices, Clay Shirky delivers a proper manifesto — a call to defend our freedom to create, discuss, link and share, rather than passively consume.

Download video. This is the most compelling and well-presented treatise I have yet seen on the subject.

If you have a website I encourage you to add the Hello Bar to your site to help raise awareness and show your opposition to PIPA.

TeamViewer is a great desktop sharing and remote control solution. Available for Linux, Mac, and Windows, TeamViewer offers two-way sharing, unattended access, file transfer, chat, voip and more. Setup is simple and it works great.

I have used the free version for simple operations like remotely helping a friend configure or install something on their computer Linux to Linux, Windows to Windows, and cross-platform. Now the usefulness of TeamViewer increases with the release of the free TeamViewer App for Android.


Continue reading »

Following up on my previous post about adding a Computer item to the nautilus Home launcher in Unity, let’s look at adding shortcuts to web pages in the Firefox launcher.

First, copy the firefox.desktop file from /usr/share/applications:

cp /usr/share/applications/firefox.desktop ~/.local/share/applications

Now open the file in a text editor, such as gedit:

gedit ~/.local/share/applications/firefox.desktop

You should see something like this (I edited out the long list of languages):

[Desktop Entry]
Version=1.0
Name=Firefox Web Browser
Comment=Browse the World Wide Web
GenericName=Web Browser
Exec=firefox %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=firefox
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;
StartupWMClass=Firefox
StartupNotify=true
X-Ayatana-Desktop-Shortcuts=NewWindow;

[NewWindow Shortcut Group]
Name=Open a New Window
Exec=firefox -new-window about:blank
TargetEnvironment=Unity

Add names for the shortcuts to the end of this line:

X-Ayatana-Desktop-Shortcuts=NewWindow;

Such as:

X-Ayatana-Desktop-Shortcuts=NewWindow;TweakBlog;

Continue reading »

I recently upraded to Ubuntu 11.04. I wanted to hate the Unity interface…really I did. I tried, but I actually find it pretty cool…now that I can customize it.

First, a screenshot of my desktop:

The wallpaper can be found here:Wallpaper
and the icon set here:Icons

What can I say? i like monochrome…it matches everything!

I wanted to add an entry to the Unity Launcher Home / File Browser icon which would give me this:

Computer

The Unity Launcher items are configured through standard .desktop files. These files originate in /usr/share/applications. The customize them, copy the file you want, such as nautilus-computer.desktop, to ~/.local/share/applications with this command:

cp /usr/share/applications/nautilus-computer.desktop ~/.local/share/applications/

Now open the file at ~/.local/share/applications/nautilus-computer.desktop with an editor like gedit:

gedit ~/.local/share/applications/nautilus-computer.desktop

You should see something like this:

[Desktop Entry]
Name=Computer
Comment=Browse all local and remote disks and folders accessible from this computer
TryExec=nautilus
Exec=nautilus --no-desktop computer:
Icon=computer
Terminal=false
StartupNotify=true
Type=Application
Categories=GNOME;GTK;Core;
OnlyShowIn=GNOME;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=nautilus
X-GNOME-Bugzilla-Component=general
X-GNOME-Bugzilla-Version=2.32.2
X-Ubuntu-Gettext-Domain=nautilus

Continue reading »

I recently got a book written by Johnathan Stark called, “Building Android Apps with HTML, CSS, and JavaScript.” This nifty little book goes through the process of creating “Android Apps” using only web scripting skills.

The basic idea is to use javascript and css to provide functionality and style to make your web site/ web app emulate the typical Android behavior and tailor the display to the mobile device. While this may (or may not) seem very useful, there’s more to the story.

The book also goes into detail describing how to launch your “app” from the home screen, store data locally on the phone, and operate in offline mode. Further, the author demonstrates the use of an open source project called PhoneGap to allow your web app to access the device hardware and features such as geolocation, accelerometer, sound, and vibration.

In a nutshell, PhoneGap works as a “wrapper” by abstracting the relevant API’s for iPhone, Android, BlackBerry, Palm, Symbian, and Windows Mobile, and producing an native-compatible app for the target platform…without writing platform-specific code.

It’s a pretty neat concept that allows for a great deal of flexibility and “cross-platform” exposure for a web app.

Description

If you know HTML, CSS, and JavaScript, you already have the tools you need to develop Android applications. This hands-on book shows you how to use these open source web standards to design and build apps that can be adapted for any Android device — without having to use Java.

You’ll learn how to create an Android-friendly web app on the platform of your choice, and then convert it to a native Android app with the free PhoneGap framework. Discover why device-agnostic mobile apps are the wave of the future, and start building apps that offer greater flexibility and a broader reach.

* Learn the basics for making a web page look great on the Android web browser
* Convert a website into a web application, complete with progress indicators and more
* Add animation with jQTouch to make your web app look and feel like a native Android app
* Take advantage of client-side data storage with apps that run even when the Android device is offline
* Use PhoneGap to hook into advanced Android features — including the accelerometer, geolocation, and alerts
* Test and debug your app on the Web under load with real users, and then submit the finished product to the Android Market

Instantiating Colors in Android

this posts's photo
A recent Android project for my Mobile Application Development class required us to draw 2d shapes and make a design. Android provides 12 Color constants for general use. The constructor for the Color object takes an int as a parameter. I wanted to draw some shapes in the appropriate “Android Green” (#a4c639), but the solution was not instantly obvious to me.

Method #1: Create an Instance of android.graphics.Color

the interesting, yet less flexible way…

From the Android reference:

The Color class defines methods for creating and converting color ints. Colors are represented as packed ints, made up of 4 bytes: alpha, red, green, blue. The values are unpremultiplied, meaning any transparency is stored solely in the alpha component, and not in the color components. The components are stored as follows (alpha << 24) | (red << 16) | (green << 8) | blue. Each component ranges between 0..255 with 0 meaning no contribution for that component, and 255 meaning 100% contribution. Thus opaque-black would be 0xFF000000 (100% opaque but no contributions from red, green, or blue), and opaque-white would be 0xFFFFFFFF

So what exactly does that techno-babble mean? I finally deciphered it…

Basically you start with the hex code for the color you want such as #a4c639. Prefix your integer with 0x, add 2 characters for transparenecy (00 for full transparency up to FF for full opacity), then add your 6 character hex color.

For example:

#a4c639 would become 0xFFA4C639.

Full post >>

© 2012 Tweak Blog Suffusion theme by Sayontan Sinha