This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import zipfile | |
def ZipDir(inputDir, outputZip): | |
'''Zip up a directory and preserve symlinks and empty directories''' | |
zipOut = zipfile.ZipFile(outputZip, 'w', compression=zipfile.ZIP_DEFLATED) | |
rootLen = len(os.path.dirname(inputDir)) | |
def _ArchiveDirectory(parentDirectory): | |
contents = os.listdir(parentDirectory) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
There are many scripts out there for this but | |
many of them use a regular expression with \b. | |
The problem with this is \b matches more then | |
white space, like '-'. So if you want to find | |
all elements with the class 'expando' elements | |
with 'expando-button' will be returned. | |
This function fixes this problem. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Assign a class to an element, or a child of the element on mouse over. | |
$('#apps .header').rollover({ | |
'className' : 'glow', | |
'childSelector' : 'h2', | |
}); | |
*/ | |
(function($){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$.fn.accordion = function(options){ | |
options = $.extend({ | |
'header': 'h1', //The header that will be clicked | |
'content': 'div', //The content, this must be a sibling of the header | |
'showFirst': false, //If true the first item will be expanded on page load | |
'easing': null, //The easing style of the animation | |
//Called when the content will hide | |
'willHide': null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$.fn.twitter = function(options){ | |
options = $.extend({ | |
//twitter url variables | |
'screen_name': null, //required | |
'count': null, | |
//plugin variables | |
'displayCount': null, //number of posts to display, regardless of how many were pulled | |
'blockSource': null, //A search string to block the diaplay of posts based on what submitted them |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$.fn.feed = function(options){ | |
options = $.extend({ | |
'url': null, //required | |
'count': null, | |
'loadingImg': null | |
}, options); | |
var root = this; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $sidebar = $('#sidebar'); | |
var easing = 'normal'; | |
function showSidebar(header, content){ | |
$.scrollTo(header, easing, function(){ | |
var sidebarContent = $(content).siblings('.sidebar')[0]; | |
if(sidebarContent){ | |
//set the width to help slideDown figure out the correct height | |
$(sidebarContent).clone().width($sidebar.width()).setClass('separator').prependTo($sidebar).slideDown(easing); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//By David Keegan | |
//InScopeApps.com | |
//http://inscopeapps.com/demos/flipbook/ | |
(function($){ | |
$.fn.flipbook = function(options){ | |
options = $.extend({ | |
'start': 0, //start frame | |
'end': 100, //end frame, must be greater then start | |
'step': 1, //number of frames to step over while animating |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Inset Shadow on Images</title> | |
<style type="text/css"> | |
.inset-shadow{ | |
-moz-box-shadow: 0 0 5px black inset; | |
-webkit-box-shadow: 0 0 5px black inset; | |
box-shadow: 0 0 5px black inset; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@protocol MyControlDelegate; | |
@interface MyControl : NSObject | |
@property (nonatomic, weak) id<MyControlDelegate> delegate; | |
- (id)initWithDelegate:(id<MyControlDelegate>)aDelegate; | |
+ (id)objectWithDelegate:(id<MyControlDelegate>)aDelegate; | |
@end |
OlderNewer