This post is literally to test the embedding track feature from Garmin Connect …..
This is a easy bike ride, it start from Ealing to to Decathlon in Canada water and stop in Parsons-Green on my way back to watch Liverpool-Arsenal at mates place before coming back home, my pace was kind of slow since I have a broken thumb and I am trying to respect London traffic now and stop at traffic lights
Garmin Forerunner 305 is awesome device by the way if you are doing a lot of outdoor Running / Cycling, I have just ordered the footpod accessory to track my workout when I play football or on a treadmill.
I am sure there is billions or more people who already done that but I needed this quickly for my project and was not feeling googling around :
If you are using Ctrl+Shift+T in Eclipse and have .git or .svn directory showing up it is easy to fix it without having to use another plugin for eclipse like subeclipse or egit.
Open the Properties of your project go to Resource=>Resource Filters and click on Add to add a new filter.
Now just do like this ScreenShot :

Edit Resource Filter for .svn or .git exclude
Change the *.git* to *.svn* if you like for subversion.
Posted in Eclipse, Java
|
I don’t really use much the GUI and always the command line so I don’t really use the Cloud File plugin I created for nautilus.
So here is a shell script to upload to Rackspace Cloud Files and give you back a shortened URL of the public URL file. Great for quick sharing… You have to install the zenity binary first..
Quick conversion from shell :
You want to connect to self signed SSL certificate from Java using the standard HttpsURLConnection and you are getting this error, because the self signed certificate is obviously not recognized by Java :
SEVERE: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1639)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:215)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:209)
it seems that there is a lot of ‘solutions’ (read hack) or workaround around the web which is resumed well on this stack overflow article.
There is actually a very easy (and secure) way on Debian based systems.
- Go to your https url with Firefox
- Right Click to ‘View Page Info’
- In ‘Security’ tab you will see a button saying ‘View Certificate’
- Click now on the ‘Details’ tab
- Finally click on the ‘Export’ button which offer you to save the PEM certifcate of the website somewhere on your filesystem.
Call it my.self.signed.domain.name.pem or whatever my.self.signed.domain.name should be and put the file in /etc/ssl/certs now you just have to run the command :
sudo update-ca-certificates
and it should add your certificate to the java keystore, you can check it with the command (Enter for Password) :
keytool -list -v -keystore /etc/ssl/certs/java/cacerts
Latest Froyo for Android have a nice feature for pushing messages to a Android phone, it’s called Android Cloud to Device Messaging Framework.
Someone at google has developped a nice extensions/apps for sending URL directly from google chrome web browser to your phone, it is called chrometophone and available here.
I often use cyrket for browsing and installing new apps. I thought it could be nice to add support to chrome2phone when sending a cyrknet URL to my Nexus one to popup a market link to install the app sent.
So here is a patch against the android APP or directly the APK to install manually.
Lately I had to do a lot of works with the VMware VCloud product and since the python API did not seem available and I did not have the courage to use the PHP API I had to do most of the API works with Java. I never did any Java before and while I have found Eclipse+Java development surprisingly pleasant and easy to use/learn my favourite are still Emacs+Python.
I have then started to look over Jython to see if I can interact easily with Java via Python and this was actually pretty easy, it took me less than 10mn to convert a Login/Listing-VAPPS script in Jython.
The script is attached at the end of this post (or on github gist here). Don’t forget to adjust the classpath variable mine are defined like that :
commons-codec-1.3.jar
commons-httpclient-3.1.jar
commons-logging-1.1.1.jar
rest-api-schemas-1.0.0.jar
vcloud-java-sdk-0.9.jar
vCloudJavaSDK-samples.jar
Most of them are the ones shipped with the official Java API
Here is the script the __main__ should get you the logic and a start how to use it :
#!/usr/bin/jython
import sys
from org.apache.commons.httpclient.protocol import Protocol
from com.vmware.vcloud.sdk import VcloudClient, Organization, Vdc
from com.vmware.vcloud.sdk.samples import FakeSSLSocketFactory
class VcloudLogin(object):
"""
VcloudLogin: Login to vcloud class
"""
vcloudClient = None
api_version = None
vcloud_url = None
def __init__(self, vcloud_url, api_version):
# This is needed if you have a self certified certificate
# remove it if you have a proper SSL certs.
self.setup_fake_ssl()
self.vcloud_url = vcloud_url
self.api_version = api_version
def setup_fake_ssl(self):
https = Protocol("https", FakeSSLSocketFactory(), 443)
Protocol.registerProtocol("https", https)
def login(self, username, password):
versions = VcloudClient.getSupportedVersions(self.vcloud_url + "/api/versions")
self.vcloudClient = VcloudClient(versions.get(self.api_version))
return self.vcloudClient.login(username, password)
if __name__ == '__main__':
URL="https://URL"
API_VERSION="0.9"
USERNAME="user@organization"
PASSWORD="password"
vcl = VcloudLogin(URL, API_VERSION)
organizations_list = vcl.login(USERNAME, PASSWORD)
for org in organizations_list.values():
for vdcLink in \
Organization.getOrganizationByReference(vcl.vcloudClient, org).getVdcLinks():
vdc = Vdc.getVdc(vcl.vcloudClient, vdcLink)
print "VDC Href: %s\n" % (vdcLink.getHref())
for vapps in vdc.getVappRefs():
print "Name: %s URL: %s" % (vapps.getName(), vapps.getHref()) |
If like me you are surprised by the fact that dbstart or dbshut does not do anything when launching it, just make sure to edit the /etc/oratab and have the last char as Y and not N. Like if it is like this :
orcl:/u01/app/oracle/product/11.2.0/dbhome_1:N
change it to this :
orcl:/u01/app/oracle/product/11.2.0/dbhome_1:Y
If you want to boot backtrack4 from time to time on your Linux desktop/laptop but don’t want to carry it on a USB drive (or CDROM) on you then this guide may help.
I am using Debian unstable on my laptop but I am sure you can adapt it to anything you want. I am using another partition (/dev/sda6) as my backtrack partition but it’s possible to copy the full thing in / as well on your main partition.
Download backtrack4 from backtrack website :
http://www.backtrack-linux.org/downloads/
- mount the iso image locally :
sudo mount -o loop bt4-final.iso /mnt
- copy the content of the iso to the root of the chosen partition (mounted in /media/part6 for me) :
cd /mnt;sudo rsync –progress -avu * /media/part6/
sudo su -
cat < /etc/grub.d/50_Backtrack
#!/bin/sh
exec tail -n +3 $0
menuentry “Backtrack” {
linux (hd0,6)/boot/vmlinuz BOOT=casper boot=casper nopersistent rw quiet vga=0×317
initrd (hd0,6)/boot/initrd.gz
}
EOF
chmod +x /etc/grub.d/50_Backtrack
sudo update-grub
And you should be able to boot the Backtrack menu, make sure this point to the right partition for me it’s (hd0,6) because my backtrack copied CD is on /dev/sda6 but your mileage may differ.