Skip to content

Instantly share code, notes, and snippets.

View lardissone's full-sized avatar

Leandro Ardissone lardissone

View GitHub Profile
@lardissone
lardissone / gist:633091
Created October 18, 2010 21:23
Center element on screen
jQuery.fn.center = function () {
this.css("position","absolute");
this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px");
this.css("left", ( $(window).width() - this.width() ) / 2+$(window).scrollLeft() + "px");
return this;
}
@lardissone
lardissone / gist:630248
Created October 16, 2010 20:43
Generate Private Certificates and Keys
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -sha1 -subj '/C=US/ST=CA/L=Mountain View/CN=yourdomain.com' -keyout myrsakey.pem -out myrsacert.pem
@lardissone
lardissone / contacts.php
Created October 16, 2010 20:31
Access Google Contacts
<?php
/************************
* Google Contact importer
*
* Asks for permissions to provide access to your Gmail/Google contacts
* to the given site.
*************************/
// include all required components from Zend Gdata
// from: http://framework.zend.com/download/gdata
/*
Theme Name: Breeze theme
Theme URI:
Description:
Version: 1.0
Author: Freshout
Tags:
*/