Friday, May 3, 2013

FileSystem inspector in Chrome Dev Tools

I love Chrome, but some features are hidden so deep that if you find them once, you are not sure you'll remember where there were.

So, you are playing with HTML5 FileSystem API and you need to see if Chrome created/saved/deleted your files or folders. There are few tricks that suppose to make your life simpler, but ... they didn't work for me because I my application is not a regular web page but Packaged App. That's why I was so happy to see that Chrome Developer Tools now include FileSystem inspector.

Here is how to enable FileSystem inspector:
- Go to chrome://flags/ and enable "Enable Developer Tools experiments"
- Restart Chrome
- Open Developer Tools and click on Resources tab.
- Click Setting (gearwheel icon at the bottom right corner), then "Experiments", and then "FileSystem inspection":


- You may need to restart Chrome again. After that you should see "FileSystem" option on "Resources" tab:


Cheers!

Thursday, April 18, 2013

Peeper Flash plugin in Chromium on Linux (Ubuntu)

Let's say you installed Chromium into your $HOME folder and discovered that there is no Flash plugin.
The solution is simple.
Step 1: Get Google Flash Plugin for Linux. See reference to other post at the end.
Step 2: Run chromium with command line switch "--ppapi-flash-path"
Example:

$HOME/chrome-linux/chrome --ppapi-flash-path='$HOME/chrome-linux/libflashplayer.so'

I borrowed that idea from this post, so all credits should go there. You can find more details there as well.

-= Oleg =-

Thursday, April 4, 2013

Mini PC - MK809 - USB Driver not recognised by ADB

It took me a while to figure out how install USB driver for MK 809, but I did it. And I did it several times using different methods because I couldn't make adb to recognise it. Finally, I came across the post that suggested to add driver vendor ID  to the "C:\Users\<your username>\.android\adb_usb.ini" file. I did it and it WORKED!!! Here is it looks:


# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.

0x2207 MiniPC driver

I'm so happy I can now debug my application on Mini PC from Eclipse. The only sad part is that my application requires WIFI and what I discovered is that when you check "USB / Connect to PC" in Android settings, then WIFI gets disabled. This seems like a limitation of this tiny device :(

-= Oleg =-

Tuesday, April 2, 2013

How to fix "Android Fix: Eclipse is loading framework information and the layout library from the SDK folder. main.xml will refresh automatically once the process is finished."

I started seeing this error after I installed additional SDK versions. I tried the following:
  • Create a new workspace as suggested in this form post. This didn't make any difference.
  • Looked if I had any older versions of SDK jar files as outlines in this blog post. It appeared that I didn't have any older jar files installed.
  • On a layout designer page, change the Android version used for rendering the layout (see top right corner of the designer window). That didn't help either.
  • Reinstall SDK as suggested here. That actually worked, except that I had to do it slightly differently.
To recap, reinstalling SDK solved the problem for me. BTW, I'm on Android SDK version 4.2.2 and I'm using Eclipse IDE. Here is how to reinstall SDK in Eclipse:
  • open Android SDK Manager. There is an icon in toolbar if you have Java perspective open.
  • Close Eclipse (not sure is this is needed, but that's what I did)
  • Check "SDK Platform" from the latest installed SDK (Android 4.2.2 in my case). 
  • Click "Delete packages". Wait for it to finish,
  • Check "SDK Platform" and all other items that were uninstalled in the previous step.
  • Click Install packages.
  • Start Eclipse.
Good luck!
Oleg.

Wednesday, July 18, 2012

FlashDevelop - "Error Definition starling.core:Starling could not be found." - SOLVED

Go to Project Properties, Classpath tab and add/edit the classpath to Starling classes.  Specify path to the src folder like this:

C:\dev\Starling-1.1\starling\src

Cheers!

Monday, April 30, 2012

How to run sudo application on startup in Ubuntu without asking for password

Option 1 - Startup Applications


Step 1: Use Ubuntu UI for configuring Startup Applications. Depending on the Ubuntu version you can either go to System > Preferences > Startup Applications or type "Startup Applications" in Dash. From there you can simply edit the list of applications that you want to run on startup. More about Startup Application UI.

Step 2: Configure your application to start with sudo without asking for password. For that you need to add your application to the list of sudoers and disable  password just for your app. Let's open the sudoers configuration file. This can be done with visudo command like this:
sudo visudo

The reason visudo commend is recommended over using a regular text editor is because it locks sudoers configuration file while you are editing it.

Now let's say your user name is user1 and app name is my_app.jar, then add the following line to the configuration file:
user1 ALL=NOPASSWD: java -jar /usr/local/my_app.jar

All done. Now you can restart Ubuntu and enjoy your app running.

Option 2 - Add your app to rc.local


Option 1 will start your application only after user has logged in. What if need to start your application before that or regardless if user has logged in or not? The one of the simplest options is to add your application to the rc.local file. Open editor:
gksu gedit /etc/rc.local

And add your command to execute application just before the exit 0 statement.

Option 3 - Run your app as a Service


Most common approach in Linux world is to add your app to the /etc/init.d script. You can do the same in Ubuntu too, but Ubuntu has something even better. It's called Upstart. You can find the mode details on how it work in this blog post and on Ubuntu help page.

The beauty of this approach is that you can easily control your service from command like using start and stop command. It also allows you to configure dependencies on other services.

-=Oleg=-

Friday, June 3, 2011

Sending bulk emails from your web application - the right way

For us, developers, it’s easy to deal with situations when your application needs to send one or two emails at a time, but is it okay to send hundreds of emails from your hosting server? Usually not and here is why.

First of all there are technical challenges. For example you have to make sure you are not exceeding the limits set by hosting providers (which are not always officially advertised).

Second and the most challenging part is getting around spam filters. If high deliverability is important to you (otherwise why would you even bother sending emails) then you need to start thinking about playing by the rules and implementing techniques like double opt-in, unsubscribe functionality and many other little things.

Unfortunately for you and fortunately for users, anti spam filters are very suspicions and it’s not that hard to get blacklisted. So if are interested in your emails being delivered into your users’ inbox, then the safest bet is let the professionals deal with that and focus on other not less important tasks.

So, now, where should you look for professional services if you need to send bulk emails? Such service is usually called email marketing. Pick carefully. There are many variations and different price points. If you don’t know where to start here are the two companies I had very good experience with: AWeber (www.aweber.com) and iContact (www.icontact.com) . As I already mentioned, I like both companies. I’d say they break even in the set of features they provide. AWeber seems to be the most popular choice - not sure why. Pricing wise iContact is a little bit cheaper, but that’s where you have to make your own comparison based on your needs.

If are not bored to death yet, I just want to mention that respectful companies like those mentioned above have API(s) for developer so if you need to send emails from your web site, you can, but now via reliable service.

Hey one more thing to consider is that email marketing companies can collects stats for you so you can actually see how many people opened your newsletter. Isn’t it cool? ;-)