AWS Elastic Beanstalk – My Experiences

December 27, 2014 by · Leave a Comment 

After using Heroku for the past 12 months, I decided to try out Amazon’s PaaS offering – Elastic Beanstalk.

Setup

I first decided created an application via the AWS console, by following the guided steps. However this actually just creates a sample application named ‘My First Elastic Beanstalk Application’. It is not possible to rename it, so there’s little point pushing your own code to it.

Amazon provies a Command Line Interface (CLI) for Elastic Beanstalk which was easy to install and setup. Creating a new application could then be initiated with:

eb init

Deployment

Code can be pushed from a git repository to EB with:

eb push

Then some 10 – 15 minutes later, the application will restart with the newly pushed code. This is quite painful compared to Heroku, which would be updated in seconds. I’d also find the CLI would give a timeout error, however the code would still get pushed correctly.

From reading a few Stack Overflow posts it does seem like the config can be tweaked to somewhat speed up pushes, but I didn’t have much success.

Logs

Heroku’s CLI has a ‘logs’ function which can easily be tailed, but sadly EB’s CLI has no such feature. You can log directly into the EB EC2 instance and tail the log file, but this is still a headache. The AWS console provides a button to get the last 100 log lines. Rather than just display them though, it gives you a downloadable file, which is pretty cumbersome.

Logs are rotated every 15 minutes, which makes it hard when you just want to view what happened in the last hour.

Logentries

I had previously been using Logentries as an add-on for Heroku, so I decided to give it a go with AWS.

I first tried using the le_aws script, which logs an EC2 instance, detects all the logs and imports them into Logentries. It painless to run, however logging was often missing chunks of lines, most likely due to the AWS 15 minute log rotation.

I then switched to using node-logentries module within my application and found it much more reliable.

Billing

The AWS Free-tier gives you enough hours to run one EC2 instance and a DB constantly. With each application runnning on it’s own instance, adding a 2nd or 3rd application will be outside the free tier. Whereas Heroku allows up to 100 applications.

Elastic IPs appear to be free for the first 5 as long as they are assigned to an EC2 instance. Otherwise you get charged for every hour they are not assigned but reserved to you, which is an easy trap to fall into.

There’s also no way to set a spend limit. You can set up billing alerts, but there’s still a chance of waking up to a huge bill if something goes wrong.

Bugzilla Attachment Icons & Image Previews User Script

September 26, 2012 by · Leave a Comment 

This user script adds file type icons and image thumbnails and previews to attachments websites running Bugzilla. Hovering the cursor over an image thumbnail will show a larger image.

Attachment Image Preview

 

The icons used in the script are from the Fatcow icon set.

The script can be found here.

Attachment File Type Icons

 

Tested on Firefox 15/GM 1.1.

Window-List: application indicator to display a list of open windows in Ubuntu Unity

June 2, 2012 by · 27 Comments 

Window-list displays a list of current open desktop windows. Windows can be activated by selecting them from the menu list.

After switching to Unity from Gnome, I immediately missed the bottom showing all the current open windows. In Unity, it’s easy to lose windows behind others. While you can retrieve them by clicking on the programs icon on the Unity dash, it can be cumbersome if you have multiple windows of the same program open.

I developed Window-List to solve this problem, by displaying a list of all open windows via an icon on the Unity top-panel indicator area.

Installation

Window-List is available for all versions of Ubuntu running Unity (Natty 11.04 onwards).

install via ppa:
sudo add-apt-repository ppa:jwigley/window-list
sudo apt-get update
sudo apt-get install window-list

Window-List can also be installed via deb package, which is also available from the launchpad repository.

run the window-list application by:
window-list

License

Window-List is released under the GPL 3.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

More information on the GNU General Public License is available here.

Override in-line CSS styles using the !important keyword

May 4, 2012 by · 3 Comments 

It’s possible to override in-line CSS with CSS from a user style sheet. By default, CSS styling set in a HTML document takes precedence over a user style sheet. However, we can overcome this by using the !important keyword.

The following HTML example has a in-line CSS style to set the width to 100px.


<table class="MyTable" style="width: 100px;">
...

</table>

Normally to style the table element, we’d use the following:

.MyTable {
    width: 200px;
}

However, as the style is set in-line, the in-line CSS style takes precedence over our style sheet.
We can get around this by using !important keyword, as follows:

.MyTable {
    width: 200px !important;
}

This now tells CSS that our ‘width’ rule takes precedence over the in-line defined style.

More information on the !important keyword and CSS inheritance can be found in the W3 CSS Specification.

Making Ubuntu Unity Look Beautiful By Enabling Transparency

April 27, 2012 by · 31 Comments 

Enabling transparency is one of simplest ways to beautify Ubuntu Unity. Unity has transparency disabled for most screen items by default. However, by following the steps below you can add transparency to your Ubuntu Unity desktop.

Top Panel Transparency

To enable transparency on the top panel, follow these steps:

Top Panel

1) Install Compiz Config Settings Manager
sudo apt-get install compizconfig-settings-manager compiz-plugins
2) Alt + F2, type ‘ccsm’ and press Enter to launch CCSM.
3) Click on the ‘Ubuntu Unity Plugin’ / ‘Experimental’ tab.
4) Modify the ‘Panel Opacity’ slider to change the panels transparency. Range 0 (transparent) – 1 (opaque).

Compiz – Top Panel Settings

Desktop Window Transparency

To enable transparency on desktop Windows, follow these steps:

1) Install Compiz Config Settings Manager (if you haven’t already)
sudo apt-get install compizconfig-settings-manager compiz-plugins
2) Alt + F2, type ‘ccsm’ and press Enter to launch CCSM.
3) Click on the ‘Opacity Brightness & Saturation’ Plugin / ‘Opacity’ tab.
4) Click ‘New’. Click ‘+’ and a new window will appear. Click ‘Grab’ and then select the desktop window on which you want to enable transparency. The name will then be filled into the Value field. Click ‘add’. Range 0 (transparent) – 100 (opaque).
5) Transparency can the be changed via the Window Values slider .
Some common window classes are ‘Ccsm’,’Nautilus’,’Dialog’,’Normal’,’Empathy’,’Gedit’,’Gnome-Terminal’

Desktop Window – Compiz

Menu Transparency

To enable transparency on Unity menus, follow these steps:

1) Install Compiz Config Settings Manager (if you haven’t already)
sudo apt-get install compizconfig-settings-manager compiz-plugins
2) Alt + F2, type ‘ccsm’ and press Enter to launch CCSM.
3) Click on the ‘Opacity Brightness & Saturation’ Plugin / ‘Opacity’ tab.
4) Click ‘New’. Type ‘Menu’ in the Windows field and adjust the Window Values slider to set the transparency level. Range 0 (transparent) – 100 (opaque).
5) Repeat step 5 for the following: ‘DropDownMenu’, ‘ToolTip’, ‘PopupMenu’.

Menu

 

Desktop Window Title Transparency

As well as having transparency on desktop windows, Ubuntu has the option to change transparency on the Window Title area.

12.04 and earlier:

1) Install Compiz Gnome and GConf Editor:
sudo apt-get install compiz-gnome gconf-editor
2) Alt+F2 , type ‘gconf-editor’ to open the GConf Editor.
3) Navigate to apps/gwd in the left panel.
4) Adjust the value column for ‘metacity_theme_active_opacity’ and ‘metacity_theme_opacity’ to set the window titles transparency. Range 0 (transparent) – 1 (opaque).

12.10:

1) Install Compiz Gnome and DConf Editor:
sudo apt-get install compiz-gnome dconf-tools
2) Alt+F2 , type ‘dconf-editor’ to open the DConf Editor.
3) Navigate to org /compiz / gwd in the left panel.
4) Adjust the value column for ‘metacity_theme_active_opacity’ and ‘metacity_theme_opacity’ to set the window titles transparency. Range 0 (transparent) – 1 (opaque).

Window Title – GConf Editor

Window Title

How to block ads in ooVoo video chat

January 30, 2012 by · 9 Comments 

Blocking ads in ooVoo is a relatively simple process. There’s a few steps involved, but there’s nothing too complex.

How to block ads in ooVoo

1) Edit hosts files

Hosts file

a) Click Start. Enter ‘Notepad’ in the search.
b) Vista/7: Right-click on the Notepad icon and select ‘Run As Administrator’.
Other: Click the icon to ‘Open’.
c) In Notepad, click ‘File’, ‘Open’ and navigate to ‘C:\windows\system32\drivers\etc’.
d) Change the file-type to ‘All Files (*.*)’. Select the ‘hosts’ file and and click ‘Open’.
e) Add the following lines to the bottom of the document:

 127.0.0.1 ds.serving-sys.com
 127.0.0.1 googlesyndication.com
 127.0.0.1 img-cdn.mediaplex.com

The above entries block anything coming from those website domains. So basically, we are just creating a list of all the places ooVoo gets it’s ads from, and blocking them.

If you discover a new place ooVoo is getting ads from, you can simply add it to the list. Alternatively you could use a comprehensive list of ad servers, such as the one found here.

Note: changes to the hosts file are system-wide. So changes you make affect any application that accesses the web, not just ooVoo.

2) Flush DNS cache

No Ads

a) Click Start. Enter ‘Cmd’ in the search.
b) Click the icon to ‘Open’.
c) Type the following: ipconfig /flushdns
Windows will report the cache was successfully flushed.

3) Restart DNS Service

a) Click Start. Enter ‘services.msc’ in the search.
b) Click the icon to ‘Open’.
c) Navigate to ‘DNS Cache’ in the list and right-click.
d) Select ‘Restart’.

4) Restart ooVoo.

a) ooVoo ads should now be replaced with a blank white box.

How to find where an ooVoo ad is from

Flash-based Ad

The ad will be one of the following two types. Identifying the source address is slightly different for each.

a) HTML based – Right-click on the ad, there will be a ‘Properties’ option. Select it and take note of the Address (URL).

b) Flash based – Right-click the ad, there will be a ‘Settings’ option. Select it and take note of the Address (URL) on the privacy tab.

 

OzBargain ‘My Comments’ Menu Item User Script – Updated

November 2, 2011 by · Leave a Comment 

This user script adds a ‘My Comments’ link to the main links bar on the OzBargain website, to allow quick navigation to the current logged in user’s ‘Comments’ page. This is helpful if you like to check back for replies to comments you’ve made, or simply see if anyone +1’d your post.

The script has been updated to match OzBargain’s October, 2011 UI update.

Tested on Google Chrome & Firefox 7/GM 0.9.12

My Comments menu item

My Comments menu item

The script can be found here.

Sony Ericsson Xperia Arc 2.3.4 (4.0.1.A.0.238) Update

October 20, 2011 by · Leave a Comment 

Recently Sony Ericsson released an update for the Xperia Arc, taking it from 2.3.3 to 2.3.4.

Update Available

The updates include the following notable changes:

– Screenshot option (via the Power button menu)

-Built in Swipe keyboard

– 3D Gallery application

– 3D/Sweep Panorama photo camera functionality

– Zoom during Video mode functionality

– Updated Time Widget

– Updated Facebook integration

– Automatic brightness option

-xLOUD speaker loudness option

– McAfee Security application pre-loaded

– Video/Music Unlimited applications pre-loaded

– Data Monitor application

The update is available OTA via Sony Ericsson’s PC Companion software.

Update Complete

 

 

 

 

 

Looping through key/value pairs from a Perl scalar hash reference

September 13, 2011 by · Leave a Comment 

If you’ve got a hash ( %hash ), it’s easy enough to loop through all the key/value pairs with the following:

foreach my $key ( keys %hash )
{
print "key: $key, value: $hash{$key}\n";
}

We could reference the hash with:

$href = \%hash;

As the hash element is scalar, the $ notation is used.

To access the key/value pairs in a hash reference, the syntax differs slightly from the first example.

foreach my $key ( keys %{ $href } )
{
print "key: $key, value: ${$href}{$key}\n";
}

Perlreftut contains a more in depth explanation of Perl references.

Go Contacts vs Go Contacts Ex – What’s the difference?

September 8, 2011 by · 7 Comments 

I’ve previously posted about the benefits of using the custom Contacts/Dialer Android app Go Contacts. However there’s also another version of the same app, by the same developers, available called Go Contacts Ex. Go Contacts Ex is a slightly tweaked version of the original with a few graphics updates.

Both apps have a similar base feature set, with Go Contacts Ex only enhancing upon Go Contacts’ visual appearance.

Dial Pad

Here is a comparison of the Dialler screens for Go Contacts and Go Contacts Ex. Both screenshots are taken with the included “Dark” theme.

Go Contacts: Dialer

Go Contacts Ex: Dialer

Display Settings

Go Contacts Ex includes a number of extra display options, including transition effects. Here’s a comparison of the two and an example of Go Contacts Ex’s transition effects.

Go Contacts: Display Settings

Go Contacts Ex: Display Settings

Go Contacts Ex: Transition

 

Other Differences

  • Go Contacts Ex allows you to set individual ring tones for each contact. (thanks D K)
  • Go Contacts ‘merge’ function allows you to specify the main contact in use. (thanks Untrusted0)/li>

Both Go Contacts and Go Contacts Ex can be found for free in the Android Marketplace.

If you’ve come across any other differences, please leave a comment below.

Next Page »