Wednesday, 30 March 2011

Firefox 4 - don't trim the URL preview

To stop Firefox 4 from trimming the URL in the preview and loading pop-ups, edit your <profile>/chrome/userChrome.css thus:
statuspanel {
max-width: 100% !important;
}
source: http://www.lifehacker.com.au/2011/03/stop-firefox-4-from-trimming-url-previews-in-the-status-bar/

Tuesday, 29 March 2011

Firefox 4 - make the app menu transparent

To change the "Firefox" app menu from orange to transparent in Firefox 4, edit your <profile>/chrome/userChrome.css thus:
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); 
#appmenu-button{
    background:transparent!important;
}
source: http://www.lifehacker.com.au/2011/03/from-the-tips-box-windows-7-favorites-the-firefox-button/

Saturday, 26 March 2011

ATV2 XBMC unofficial nightlies

ssh root@apple-tv.local
cd /private/var/tmp && \
wget 'http://hadm.net/~keith/xbmc_atv2/latest_atv2.deb' && \
dpkg -i latest_atv2.deb && \
rm latest_atv2.deb

Sunday, 20 March 2011

ATV2 xbmc.log file location

Apple TV 2 XBMC's xbmc.log file is located at:

/private/var/mobile/Library/Preferences/xbmc.log

Saturday, 19 March 2011

Showing a background image while an iframe is loading

Rather than a white rectangle on your page while an <iframe> is loading, you can set a background image in CSS. This works in IE7 & IE8 (with a bit of a flash when the iframe content is ready); Firefox 3.6 and Chrome 10 (perfectly); but in Safari 5 the background image is not shown until the iframe is loaded.

I found this useful when 'co-branding' a site to use another site's header and footer in an iframe. Since I could not trust the speed of the other sites, I grabbed their logo, then positioned it as a background image on the iframe so the logo was in the same position as the final iframe version. Then at least the user sees a nice logo straight away, and they might need a second or two before the navigation and other elements of the other sites headers show up.

This was the iframe code:
<iframe width="960" height="154" scrolling="no" frameborder="0"
marginwidth="0" marginheight="0" src="[other-site-URL]"
style="background:url('[local-logo-URL]') no-repeat scroll [X-off]px [Y-off]px;"></iframe>

Friday, 18 March 2011

iframe mysterious 3px margin

If you have some HTML like:

<iframe ...></iframe>
<div></div>

... you'll have a mysterious 3px gap between the elements even though everything says the margins are all zero. Rather than putting a margin-top="-3px" on the div, the better solution is to change the <iframe> to display:block.

Yup ... <iframe>'s default to display inline. Who would have guessed that!

Tuesday, 15 March 2011

Atlassian Bamboo running below normal as a service in Windows

To run the Atlassian Bamboo service in Windows at the "below normal" base priority, add this line to the conf/wrapper.conf file before installing the service:

wrapper.ntservice.process_priority=BELOW_NORMAL

Atlassian Bamboo as a service in Windows 64

If you try and run Atlassian Bamboo as a service on Window Vista 64 bit (and Windows 7 bit), you will get this in the bamboo.log:

INFO::jetty-7.2.1.v20101111
WARN::tmpdir
java.io.IOException: The system cannot find the path specified
at java.io.WinNTFileSystem.createFileExclusively(Native Method)

The workaround for Windows 7 (source: http://jira.atlassian.com/browse/BAM-8014 and http://confluence.atlassian.com/x/YYPcDQ) is to edit the conf/wrapper.conf file to add a java.io.tmpdir setting.

In Windows Vista, that does not work. Instead you need to change the service configuration to run as "this account" and enter a valid local user account. Then grant the "login as service" privilege to that account. Source: http://confluence.atlassian.com/display/BAMBOO/Running+Bamboo+service+on+Windows+as+the+local+user

Monday, 14 March 2011

Apple TV2, XBMC, disabling subtitles

When playing a video, press and hold the ok/enter button the remote to access the video playing "context" menu. From there, you can choose the audio option and disable subtitles.

Saturday, 12 March 2011

Apple TV2 Timezone fix for "wrong" time in XBMC

ssh into your ATV2, then:
cd /var/db/timezone
rm localtime
ln -s /usr/share/zoneinfo/Australia/Sydney localtime