Recent Updates RSS Toggle Comment Threads | Keyboard Shortcuts

  • Sasha O 1:50 am on 2011-07-09 Permalink | Reply  

    Google+: “Oops, you need a google profile to use this feature” and a workaround 

    Update: This is no longer relevant. Google+ allows to log in with a Google Apps account.

    I use my custom domain name Google Apps account as my primary email. I still have Google account and Google profile but I am not logged into this account by default.

    So when I go to http://google.com/+ I get this dreaded error message:

    Oops, you need a google profile to use this feature

    Oops, you need a google profile to use this feature

    I found a workaround to this problem. The solution requires that a) you have a “regular” Google Account (…@gmail.com) and b) this account should be enabled the “Sign in to multiple Google Accounts” feature (thanks Paul for the tip) :

    1. Go to any profile page on Google plus:

    Go to your Google Profile

    2. Click on the Account -> Switch Accounts menu:

    Switch accounts menu

    3. Select the Google Account (not the Google Apps account) or log into your Google Account:

    Switch to Google Account

    Bingo! Your Google plus is now working!

     
    • matt 10:08 pm on 2011-07-10 Permalink | Reply

      Thats a simple yet elegant tip. Thanks. :)

    • Paul 2:21 am on 2011-07-11 Permalink | Reply

      Good tip – note that you will need ‘Sign in to multiple Google Accounts’ enabled before you can see the ‘Switch Account’ link. You will find the switch on your google account page.

      • Sasha O 3:35 am on 2011-07-11 Permalink | Reply

        Thanks Paul, I have updated the post with the reference

    • Donna 7:30 pm on 2011-07-12 Permalink | Reply

      Did they block this workaround? or is this also subject to throttling? As it doesn’t work for me atm..

      I am signed into my Gmail and my Google Apps email and I see the posts on the person’s profile (as I did before) but still with no comment/+1/follow buttons on the page.

      • Sasha O 12:13 am on 2011-07-13 Permalink | Reply

        Just checked — works as it was. Guess you need to “Switch account” to your Gmail one. Just logging in won’t cut it

    • Jake 2:02 am on 2011-07-26 Permalink | Reply

      This is no longer working.
      I did the following
      1) enabled multi account login on both my
      accounts
      2) logged into my apps account
      3) switched to my regular account
      still get the same message

      • Sasha O 4:09 am on 2011-07-26 Permalink | Reply

        Jake —

        Just checked it again in a fresh ‘incognito’ window on Chrome — works for me just as it did. Did you try to clean cookies?

        Thanks,
        – Sasha

    • GG 1:28 am on 2011-07-31 Permalink | Reply

      I tried this and it was a no-go. Cleaned cookies, etc. Wonder if the two step authentication I enabled is messing about somewhere in Google’s entrails. Ah well, it’ll be available officially for apps users soon (or so the word goes)

    • Arseniy 6:41 pm on 2011-08-02 Permalink | Reply

      nice
      that’s going to be popular issue

    • Andrew Vit 2:20 am on 2011-08-11 Permalink | Reply

      Unfortunately doesn’t work for me because my personal Google account wasn’t set up as @gmail.com, but rather using my own domain. That personal account and the Apps account were separate logins (with the same email address) but now they’ve been merged so I can’t log in using that identity as a “personal” user anymore. Hopefully Google fixes these login issues soon.

      • Sasha O 6:20 am on 2011-08-14 Permalink | Reply

        Andrew, I am in exactly the same situation: I have my GA and Gmail accounts linked. Did you try to login into http://gmail.com directly?

  • codebistro 11:59 am on 2011-01-11 Permalink | Reply
    Tags: , , Maven   

    BuildNumber — from SVN into your application 

    Finally found some time to publish BuildNumber — a Maven plugin and Ant task to embed SVN build number into your application during build. Great for tracking what version is deployed where.

     
    • Yegor 12:04 pm on 2011-01-16 Permalink | Reply

      There is another possible alternative: http://mojo.codehaus.org/buildnumber-maven-plugin/ (for Maven only).

      • sashaov 12:45 pm on 2011-01-16 Permalink | Reply

        Yeah, I remember looking at it then. I needed the build number to use it right in the program code and it was a bit of challenge to get it out of that mojo, so I had wrote my own ;-) .This Mojo creates a property file which is then available to the program.

  • codebistro 1:44 pm on 2010-08-24 Permalink | Reply
    Tags: , developer tools, , version control   

    rsync IDE project files 

    The jury is still out on whether to version control the IDE files (see for example this question on StackOverflow). I recently tend to agree with Anton and lend towards not version-controlling or at least keeping them separate.

    This little rsync script can help moving all project files to a separate hierarchy so that you can manage them separately from your source tree:

    #!/bin/sh
    rsync -av \
    –filter=’+ */’ \
    –filter=’+ .classpath’ \
    –filter=’+ .project’ \
    –filter=’+ **/*.iml’ \
    –filter=’+ .idea/***’ \
    –filter=’- *’ \
    –prune-empty-dirs $1 $2

    Thanks Shane Meyers for the insight into rsync filter patterns.

     
  • codebistro 12:33 am on 2010-07-18 Permalink | Reply
    Tags: , , , JRE, Mac OS, ProGuard   

    ProGuard, Mac OS X, runtime libraries and honey 

    ProGuard is a great tool for packaging your Java Applet or application. We use it mainly to package a program and bunch of dependencies into small .jar file. It works great on Linux and Windows but on my Mac it would end up with messages like:

    [proguard] Reading library jar [/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/jsse.jar]
    [proguard] Error: Can't read [proguard.ClassPathEntry@50502819] (No such file or directory)

    With some help  from the Eric Lafortune, the ProGuard author, the solution was to put a link to the missing file to its “regular” place in Java libraries:

    cd $JAVA_HOME/lib
    sudo ln -s ../../Classes/classes.jar rt.jar
    sudo ln -s ../../Classes/jsse.jar .

    The downside is that you should do some manual stuff on each Mac you want to build on. If somebody has better solution I would love to know about it.

    In military training long time ago, I and my fellow students were forced to do a lot of things that were illogical, redundant or  outright stupid. Sometimes our only explanation was “so the life wouldn’t seem sweet like honey”. It kind of made sense to make life intentionally hard in the army — it was supposed to be training after all. It seems that the Apple in this case was following the same logic: let’s spread runtime libraries all over the system so that the engineer’s life wouldn’t seem too sweet like honey. Anybody got better explanation, please let me know.

     
  • codebistro 12:07 am on 2010-03-25 Permalink | Reply
    Tags: , Security, Tips   

    Adding CACert to the Java Trusted Store 

    http://www.cacert.org/ is a great way to easily create free SSL certificates for development work. In order to successfully connect from Java program using SSL to a server carrying a certificate issued by CACert you need to “bless” the certiticate, or make it trusted by your your local Java JRE installation.

    Let’s first make sure we are in the lib/security subdirectory of the currently running JRE:

    > cd $JDK_HOME\jre\lib\security

    Then, download the certificate file to your local computer:

    $JDK_HOME\jre\lib\security> wget http://www.cacert.org/certs/root.crt
    --2010-03-16 09:24:40--  http://www.cacert.org/certs/root.crt
    Resolving http://www.cacert.org... 213.154.225.245
    Connecting to http://www.cacert.org|213.154.225.245|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 2569 (2.5K) [application/x-x509-ca-cert]
    Saving to: `root.crt'
    100%[======================================>] 2,569       15.4K/s   in 0.2s
    2010-03-16 09:24:41 (15.4 KB/s) - `root.crt' saved [2569/2569]

    Now let’s import the certificate into the JRE keystore (note the password of the default JRE keystore — it’s different on different platforms):

    $JDK_HOME\jre\lib\security> keytool -import -keystore cacerts  -storepass changeit -alias cacert-root1 -trustcacerts -file root.crt Owner: EMAILADDRESS=support@cacert.org, CN=CA Cert Signing Authority, OU=http://www.cacert.org, O=Root CA
    Issuer: EMAILADDRESS=support@cacert.org, CN=CA Cert Signing Authority, OU=http:/ /www.cacert.org, O=Root CA Serial number: 0 Valid from: Sun Mar 30 04:29:49 PST 2003 until: Tue Mar 29 05:29:49 PDT 2033 Certificate fingerprints: MD5:  A6:1B:37:5E:39:0D:9C:36:54:EE:BD:20:31:46:1F:6B SHA1: 13:5C:EC:36:F4:9C:B8:E9:3B:1A:B2:70:CD:80:88:46:76:CE:8F:33 Trust this certificate? [no]:  yes Certificate was added to keystore

    Now you are ready to start sending Java SSL requests to your server.

     
  • codebistro 5:41 am on 2008-12-23 Permalink | Reply
    Tags: Development, Web   

    The AHAH! Moment 

    By my faith! For more than forty years I have been speaking prose without knowing anything about it, and I am much obliged to you for having taught me that.

    Molière

    We have been doing AHAH for a few months and now I know! The thing definitely makes sense, especially as the app gets more complicated and every bit of code shaved off the client side saves us a bit of our lives.

    The performance still requires investigation. For now I assume that transparent gzip compression can make HTML snippets just about as small as compressed JSON responses.

     
    • Burton 11:56 pm on 2010-03-09 Permalink | Reply

      codeibstro.com, how do you do it?

    • Sasha Ovsankin 10:53 am on 2010-03-11 Permalink | Reply

      Well the main advantage here to avoid duplication (DRY). Imagine a web page which is both rendered by the server (for SEO) as well as dynamically, via AJAX. Something like Twitter. If you do the AJAX rendering the usual way — get the data via JSON and then “dress it up” into HTML, you end up with 2 totally different pieces of rendering code which should be synchronized, a headache.

      Using AHAH, you render both of them using the same code on the server side, transfer the rendered piece via AJAX and then the client-side JavaScript would only stick it at a proper place in DOM. Makes sense?

      However since the time of this post things changed a bit: the HTML has become more “semantic” so the rendering magic shifted to CSS which can be safely reused by both sides. Also, we made some sort of browser-side templates: we put template in HTML with “display:none”, then for rendering we copy it, populate and make it visible. Still a bit of duplication but not really a big problem. So AHAH is not used that much any more.

    • Anton 6:40 pm on 2010-06-28 Permalink | Reply

      wikipedia link got deleted, that one worked fine for me

      http://microformats.org/wiki/rest/ahah

      • codebistro 11:29 pm on 2010-06-28 Permalink | Reply

        Thanks, fixed the enry

c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel
Follow

Get every new post delivered to your Inbox.