Sunday, November 7, 2010

HTML5 css transitions

I was trying to figure out the minimum required to do a left to right, top to bottom, right to left, and bottom to top transition of the entire page in HTML5 for Safari.

I found some examples and determined these types of page transitions are just manipulation of location of your element on the page.

Here's an example of a page sliding in from left to right.  The basics here are

  • setting a position to absolute for your item,
  • setting the start location (in this example left margin)
  • setting the  -webkit-transition: all 0.5s  ease-in-out;
  • and then on loading the page, changing the class to a class with a different left margin (I used jquery here since it's the easiest to accomplish)

Here's the code:


<!DOCTYPE html>

<html>

    <head>

    <title>Title of My Page</title>
<meta charset="utf-8">
<meta name="description" content="The head tag contains the title and meta tags - important to the search engines, and information for the browser to properly display the page.">

<style type="text/css">
/* set the starting position for the element */
.previous{
left: -100%;
}
/* setup the element to move */
#Home{
display:block;
position: absolute;
top:0px;
width: 100%;
height: 100%;
    -webkit-transition: all 0.5s  ease-in-out;
background: #cbd2d8;
  
}
/* set the final location of the element */
.current{
    left: 0px;
}
</style>
<script type="text/javascript" src="jquery-1.4.3.js"></script>

<script type="text/javascript">
// change the class for #Home which changes the left location
$(document).ready(function() {
    $("#Home").removeClass("previous");
   $("#Home").addClass("current")
});
</script>

    </head>


<body>
    <div id="Home" class="previous">
        Content Goes Here
        </div>
        </body>
        </html>


To make the page go from right to left, change the css classes to:
.previous{
left: 100%;
}
.current{
    left: 0px;
}

Left to right:
.previous{
left: -100%;
}
.current{
    left: 0px;
}

Top to bottom:
.previous{
top: 100%;
}
.current{
    top: 0px;
}

Bottom to Top:
.previous{
top: -100%;
}
.current{
    top: 0px;
}

  

Quick and Easy

Friday, September 24, 2010

KARL Demo

When I evaluate new technologies to use, I love to see a demo before I spend the time delving into details on a new product.  I setup a demo for KARL online to let those interested in KARL preview the technology.  I work at Six Feet Up as the KARL Champion which provides hosting for this open source project.  Find out more about KARL on the Six Feet Up website. or how to download the open source version of KARL on the KARL Project website.


KARL introduces Feeds

One of the most recent solutions offered by Six Feet Up is hosting for KARL. KARL is a Knowledge Management system created by OSF with Six Feet Up as the exclusive provider of hosting.
KARL allows members of your organization to collaborate with each other as well as collaborating with customers, partners, consultants, or other individuals outside your organization. KARL creates virtual communities to organize groups of members by topic and common projects.
A new feature was introduced to KARL recently called Feeds. The Feeds feature allows KARL members to view changes in KARL in real time across a user's communities.
As members add new content or edit existing content, the feed provides a running view of the changes being made.
Security in KARL is one of its fundamental features. The Feeds option maintains the security model built into KARL. KARL Staff can see feed items from all of the public communities and the communities of which they are a member. KARL Affiliates see only feed items that they have permission to view.
You can see how the new Feeds feature works in the KARL Demo

KARL

I work at Six Feet Up as KARL Champion.
KARL is an open source, web-based product for collaboration, organizational intranets and knowledge management.  I put together some info about all KARL has to offer including some screen shots on Six Feet Up's website.  I also put together a demo site which allows you to preview the features in KARL.

Friday, June 25, 2010

Tuesday, March 2, 2010

How to add ssh private key to Apple Keychain.


After all sorts of tries in figuring out how to login to remote server using ssh and do a svn update, I was still having problems with my keys on the remote server.

Rossi found this which saved me:


From: http://www.schmidp.com/2009/06/23/enable-ssh-agent-key-forwarding-on-snow-leopard/

You may need to add your passphrases to the Apple keychain. In the terminal, type:
ssh-add -K ~/.ssh/id_rsa
Or whatever the path to your private key is. Do this for each key. This will put the passphrase in the Apple keychain and you will not be prompted for passphrases. If you do not have a key in the default file (id_rsa or id_dsa), the Apple mechanisms do not seem to automatically prompt you for your passphrases.
That worked for me.
Best wishes,
Alan

Tuesday, January 12, 2010

Installing Zope 2.12.0 with buildout

I've tried a couple of times to install Zope 2 from various instructions I found online.  Each give me a unique set of problems.  I've installed a fresh version of Python 2.6 in previous post, and have used these instructions for installing Zope 2 using a buildout.

Here's my following/adaptions of instructions from http://docs.zope.org/zope2/zdgbook/GettingStarted.html

$ mkdir zopeproj1
$ cd zopeproj1/
$ touch buildout.cfg
$ wget -c http://svn.zope.org/repos/main/zc.buildout/trunk/bootstrap/bootstrap.py

--22:09:09--  http://svn.zope.org/repos/main/zc.buildout/trunk/bootstrap/bootstrap.py
           => `bootstrap.py'
Resolving svn.zope.org... 74.84.203.155
Connecting to svn.zope.org[74.84.203.155]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3,807 [application/x-httpd-cgi]

100%[===================================================================================================>] 3,807         --.--K/s            

22:09:09 (1.00 MB/s) - `bootstrap.py' saved [3807/3807]

$ ls
bootstrap.py buildout.cfg

$ ~/myprojects/opt/Python-2.6.4/bin/python2.6 bootstrap.py
Downloading http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg
Creating directory '/Users/jbglenn/myprojects/zope2/zopeproj1/bin'.
Creating directory '/Users/jbglenn/myprojects/zope2/zopeproj1/parts'.
Creating directory '/Users/jbglenn/myprojects/zope2/zopeproj1/eggs'.
Creating directory '/Users/jbglenn/myprojects/zope2/zopeproj1/develop-eggs'.
Generated script '/Users/jbglenn/myprojects/zope2/zopeproj1/bin/buildout'.

$ mate buildout.cfg
made buildout look like this:
[buildout]
parts = zope2
        instance
extends = http://download.zope.org/Zope2/index/2.12.0/versions.cfg

[zope2]
recipe = zc.recipe.egg
eggs = Zope2
interpreter = zopepy

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 8080
eggs = ${zope2:eggs}
$ ./bin/buildout 

Here are parts of the results of buildout (in case anyone is following along).  These show the errors/warnings I get.  It did finish buildout "successfully" though and works so far:
Got plone.recipe.zope2instance 4.0a2.
Getting distribution for 'Zope2>=2.12.1'.
src/AccessControl/cAccessControl.c:596: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:598: warning: ‘intargfunc’ is deprecated
src/AccessControl/cAccessControl.c:598: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:599: warning: ‘intargfunc’ is deprecated
src/AccessControl/cAccessControl.c:599: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:600: warning: ‘intintargfunc’ is deprecated
src/AccessControl/cAccessControl.c:600: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:601: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:602: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:606: warning: ‘intargfunc’ is deprecated
src/AccessControl/cAccessControl.c:606: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:596: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:598: warning: ‘intargfunc’ is deprecated
src/AccessControl/cAccessControl.c:598: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:599: warning: ‘intargfunc’ is deprecated
src/AccessControl/cAccessControl.c:599: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:600: warning: ‘intintargfunc’ is deprecated
src/AccessControl/cAccessControl.c:600: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:601: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:602: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:606: warning: ‘intargfunc’ is deprecated
src/AccessControl/cAccessControl.c:606: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:596: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:598: warning: ‘intargfunc’ is deprecated
src/AccessControl/cAccessControl.c:598: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:599: warning: ‘intargfunc’ is deprecated
src/AccessControl/cAccessControl.c:599: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:600: warning: ‘intintargfunc’ is deprecated
src/AccessControl/cAccessControl.c:600: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:601: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:602: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:606: warning: ‘intargfunc’ is deprecated
src/AccessControl/cAccessControl.c:606: warning: initialization from incompatible pointer type
src/DocumentTemplate/cDocumentTemplate.c:169: warning: initialization from incompatible pointer type
src/DocumentTemplate/cDocumentTemplate.c:600: warning: initialization from incompatible pointer type
src/DocumentTemplate/cDocumentTemplate.c:169: warning: initialization from incompatible pointer type
src/DocumentTemplate/cDocumentTemplate.c:600: warning: initialization from incompatible pointer type
src/DocumentTemplate/cDocumentTemplate.c:169: warning: initialization from incompatible pointer type
src/DocumentTemplate/cDocumentTemplate.c:600: warning: initialization from incompatible pointer type
src/MultiMapping/_MultiMapping.c:159: warning: initialization from incompatible pointer type
src/MultiMapping/_MultiMapping.c:159: warning: initialization from incompatible pointer type
src/MultiMapping/_MultiMapping.c:159: warning: initialization from incompatible pointer type
src/Record/_Record.c: In function ‘Record___setstate__’:
src/Record/_Record.c:81: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type
src/Record/_Record.c: At top level:
src/Record/_Record.c:338: warning: initialization from incompatible pointer type
src/Record/_Record.c:340: warning: ‘intargfunc’ is deprecated
src/Record/_Record.c:340: warning: initialization from incompatible pointer type
src/Record/_Record.c:341: warning: ‘intargfunc’ is deprecated
src/Record/_Record.c:341: warning: initialization from incompatible pointer type
src/Record/_Record.c:342: warning: ‘intintargfunc’ is deprecated
src/Record/_Record.c:342: warning: initialization from incompatible pointer type
src/Record/_Record.c:343: warning: initialization from incompatible pointer type
src/Record/_Record.c:344: warning: initialization from incompatible pointer type
src/Record/_Record.c:425: warning: initialization from incompatible pointer type
src/Record/_Record.c: In function ‘Record___setstate__’:
src/Record/_Record.c:81: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type
src/Record/_Record.c: At top level:
src/Record/_Record.c:338: warning: initialization from incompatible pointer type
src/Record/_Record.c:340: warning: ‘intargfunc’ is deprecated
src/Record/_Record.c:340: warning: initialization from incompatible pointer type
src/Record/_Record.c:341: warning: ‘intargfunc’ is deprecated
src/Record/_Record.c:341: warning: initialization from incompatible pointer type
src/Record/_Record.c:342: warning: ‘intintargfunc’ is deprecated
src/Record/_Record.c:342: warning: initialization from incompatible pointer type
src/Record/_Record.c:343: warning: initialization from incompatible pointer type
src/Record/_Record.c:344: warning: initialization from incompatible pointer type
src/Record/_Record.c:425: warning: initialization from incompatible pointer type
src/Record/_Record.c: In function ‘Record___setstate__’:
src/Record/_Record.c:81: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type
src/Record/_Record.c: At top level:
src/Record/_Record.c:338: warning: initialization from incompatible pointer type
src/Record/_Record.c:340: warning: ‘intargfunc’ is deprecated
src/Record/_Record.c:340: warning: initialization from incompatible pointer type
src/Record/_Record.c:341: warning: ‘intargfunc’ is deprecated
src/Record/_Record.c:341: warning: initialization from incompatible pointer type
src/Record/_Record.c:342: warning: ‘intintargfunc’ is deprecated
src/Record/_Record.c:342: warning: initialization from incompatible pointer type
src/Record/_Record.c:343: warning: initialization from incompatible pointer type
src/Record/_Record.c:344: warning: initialization from incompatible pointer type
src/Record/_Record.c:425: warning: initialization from incompatible pointer type
Got Zope2 2.12.3.
Getting distribution for 'zope.app.schema==3.5.0'.

-------
Getting distribution for 'five.formlib'.
Got five.formlib 1.0.2.
Getting distribution for 'docutils==0.5'.
"optparse" module already present; ignoring extras/optparse.py.
"textwrap" module already present; ignoring extras/textwrap.py.
zip_safe flag not set; analyzing archive contents...
docutils.parsers.rst.directives.misc: module references __file__
docutils.writers.html4css1.__init__: module references __file__
docutils.writers.newlatex2e.__init__: module references __file__
docutils.writers.pep_html.__init__: module references __file__
docutils.writers.s5_html.__init__: module references __file__
Got docutils 0.5.
Getting distribution for 'ZODB3==3.9.0'.
-------
Got zope.copypastemove 3.5.2.
Getting distribution for 'zope.minmax==1.1.0'.
Got zope.minmax 1.1.0.
Installing zope2.
Generated script '/Users/jbglenn/myprojects/zope2/zopeproj1/bin/runzope'.
Generated script '/Users/jbglenn/myprojects/zope2/zopeproj1/bin/zopectl'.
Generated script '/Users/jbglenn/myprojects/zope2/zopeproj1/bin/zpasswd'.
Generated script '/Users/jbglenn/myprojects/zope2/zopeproj1/bin/mkzeoinstance'.
Generated script '/Users/jbglenn/myprojects/zope2/zopeproj1/bin/mkzopeinstance'.
Generated interpreter '/Users/jbglenn/myprojects/zope2/zopeproj1/bin/zopepy'.
Installing instance.
Traceback (most recent call last):
  File "", line 1, in
ImportError: No module named Zope2
Generated script '/Users/jbglenn/myprojects/zope2/zopeproj1/bin/instance'.

---------------------------------------
$ ./bin/instance fg
/Users/jbglenn/myprojects/zope2/zopeproj1/parts/instance/bin/runzope -X debug-mode=on
2010-01-12 22:22:34 INFO ZServer HTTP server started at Tue Jan 12 22:22:34 2010
Hostname: 0.0.0.0
Port: 8080
2010-01-12 22:22:37 INFO Zope Ready to handle requests