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
Window.implement({ | |
fireEvent: function(type, args, delay){ | |
var events = this.retrieve('events'); | |
if (!events || !events[type]) return this; | |
events[type].keys.each(function(fn){ | |
fn.create({'bind': this, 'delay': delay, 'arguments': args})(); | |
}, this); | |
if (!type.test(/^after/)) this.fireEvent('after' + type.capitalize()); | |
return 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
// not optimized for performance because the Fx.Tween object is continually recreated by calling $('big_picture').get('tween') with new options | |
$('left').addEvent('click', function(){ | |
if(!$('left').hasClass('deactivated')) { | |
current_id = $('big_picture').get('class').replace('image_', ''); | |
current_id--; | |
$('big_picture').get('tween',{ | |
onComplete: function() { | |
$('big_picture').set('src', 'pictures/' + current_id + '.jpg'); | |
$('big_picture').fade(1); | |
$('big_picture').set('class', 'image_' + current_id); |
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
<h1>First Accordian</h1> | |
<div class="accordion"> | |
<h3 class="toggler">Heading 1</h3> | |
<div class="element"> | |
<p>Some text</p> | |
</div> | |
<h3 class="toggler">Heading 2</h3> | |
<div class="element"> | |
<p>Some text</p> | |
</div> |
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
<!-- Example of the li statement for author commenting based on ID --> | |
<li id="comment-<?php comment_ID() ?>" class="comment<?php if(!isset($themeOptions)) { $themeOptions = get_option('ThemeOptionStorage'); } if ($themeOptions["owner_id"] == $comment->user_id) { echo ' author'; } ?>"> |
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
window.addEvent('domready', function() { | |
//create our Accordion instance | |
var myAccordion = new Accordion($('accordion'), 'a.toggler', 'div.element', { | |
start:'all-close', | |
alwaysHide: true, | |
opacity: true, | |
onActive: function(toggler, element){ | |
toggler.setStyle('background-position', '0 -30px'); | |
}, |
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 PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<title>{Title}</title> | |
<link rel="shortcut icon" href="{Favicon}"> | |
<link rel="alternate" type="application/rss+xml" href="/rss"> | |
<style type="text/css"> | |
body { |
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
" Vim syntax file | |
" Language: LESS Cascading Style Sheets | |
" Maintainer: Leaf Corcoran <leafot@gmail.com> | |
" Modifier: Bryan J Swift <bryan@bryanjswift.com> | |
" URL: http://leafo.net/lessphp/vim/less.vim | |
" URL: http://gist.github.com/161047 | |
" Last Change: 2009 August 4 | |
" LESS by Leaf Corcoran | |
" CSS2 by Nikolai Weibull | |
" Full CSS2, HTML4 support by Yeti |
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
" Vim syntax file | |
" Language: Velocity Template Language | |
" Maintainer: Antonio Terceiro <terceiro@im.ufba.br> | |
" Maintainer: Bryan J Swift <bryan@bryanjswift.com> | |
" Last Change: 2009 Sep 20 | |
" For version 5.x: Clear all syntax items | |
" For version 6.x: Quit when a syntax file was already loaded | |
if version < 600 | |
syntax clear |
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 sbt._ | |
class SbtPluginProject(info:ProjectInfo) extends PluginProject(info) { | |
// *-- Copy of ResolverPlugin contents because a project can't depend on itself | |
val resolverPath = propertyOptional[String](".resolver") | |
private def sbtPublishResolver = { | |
import java.io.FileInputStream | |
import java.util.Properties | |
val props = new Properties() { def apply(key:String) = this.getProperty(key) } | |
props.load(new FileInputStream(resolverPath.value)) |
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
trait User extends Credentials { | |
def credentials:WkCredentials | |
val uuid:Option[String] | |
val username:String = credentials.username | |
val password:String = credentials.password | |
val role:UserRole = credentials.role | |
val title:String = credentials.title | |
val active:Boolean = credentials.active | |
} | |
case class Credentials( |
OlderNewer